CComCurrency::operator +

此运算符用于执行在 CComCurrency 对象的添加。

CComCurrency operator +(
   const CComCurrency & cur 
) const;

参数

  • cur
    要添加的 CComCurrency 对象为原始对象。

返回值

返回表示加法运算的结果 CComCurrency 对象。在一个错误情况下,例如溢出,此运算符调用使用描述错误的HRESULT的 AtlThrow

示例

CComCurrency cur1(10, 5000), cur2;
cur2 = cur1 + CComCurrency(4, 5000);
ATLASSERT(cur2 == CComCurrency(15, 0));

要求

Header: atlcur.h

请参见

参考

CComCurrency选件类

CComCurrency::operator *=

CComCurrency::operator +

CComCurrency::operator -

CComCurrency::operator/