다음을 통해 공유


CComCurrency::operator *

This operator is used to perform multiplication on a CComCurrency object.

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

Parameters

  • nOperand
    The multiplier.

  • cur
    The CComCurrency object used as the multiplier.

Return Value

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

Example

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

Requirements

Header: atlcur.h

See Also

Concepts

CComCurrency Class

CComCurrency Members

CComCurrency::operator *=

CComCurrency::operator +

CComCurrency::operator -

CComCurrency::operator /