CComCurrency::operator *=

 

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

语法

      const CComCurrency & operator *=(
   long nOperand 
);
const CComCurrency & operator *=(
   const CComCurrency & cur 
);

参数

  • nOperand
    乘数。

  • cur
    作为倍数使用的 CComCurrency 对象。

返回值

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

CComCurrency cur(10, 5000);
cur *= 2;
ATLASSERT(cur == CComCurrency(21, 0));   

要求

Header: atlcur.h

请参阅

CComCurrency Class
CComCurrency::operator *
CComCurrency::operator +
CComCurrency::operator -
CComCurrency::operator /