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

Reference

CComCurrency Class

CComCurrency::operator *=

CComCurrency::operator +

CComCurrency::operator -

CComCurrency::operator /

Other Resources

CComCurrency Members