CComCurrency::operator +=

此运算符用于执行在 CComCurrency 对象的添加并将结果赋给当前对象。

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

参数

  • cur
    CComCurrency 对象。

返回值

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

示例

CComCurrency cur(10, 2500);
cur += CComCurrency(4, 2500);
ATLASSERT(cur == CComCurrency(14, 5000));

要求

Header: atlcur.h

请参见

参考

CComCurrency选件类

CComCurrency::operator *=

CComCurrency::operator +

CComCurrency::operator -

CComCurrency::operator/