CComCurrency::operator - =

此运算符用于执行在 CComCurrency 对象的减法并将其分配结果。

const CComCurrency & operator -=(
   const CComCurrency & cur 
);

参数

  • cur
    CComCurrency 对象。

返回值

返回更新 CComCurrency 对象。在一个错误情况下,例如溢出,此运算符调用使用描述错误的HRESULT的 AtlThrow

示例

CComCurrency cur(10, 5000);
cur -= CComCurrency(4, 5000);
ATLASSERT(cur == CComCurrency(6, 0));

要求

Header: atlcur.h

请参见

参考

CComCurrency选件类

CComCurrency::operator -

CComCurrency::operator +

CComCurrency::operator *

CComCurrency::operator/