Share via


CComCurrency::operator *=

 

This operator is used to perform multiplication on a CComCurrency object and assign it the result.

Syntax

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

Parameters

  • nOperand
    The multiplier.

  • cur
    The CComCurrency object used as the multiplier.

Return Value

Returns the updated CComCurrency object. In the event of an error, such as an overflow, this operator calls AtlThrow with an HRESULT describing the error.

Example

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

Requirements

Header: atlcur.h

See Also

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