COleCurrency::operator *=, /=

 

Allow you to scale this COleCurrency value by an integral value.

Syntax

      const COleCurrency& operator *=(
   long nOperand 
);
const COleCurrency& operator /=(
   long nOperand 
);

Remarks

If the COleCurrency operand is null, the status of this COleCurrency object is set to null.

If the arithmetic operation overflows, the status of this COleCurrency object is set to invalid.

If the COleCurrency operand is invalid, the status of this COleCurrency object is set to invalid.

For more information on the valid, invalid, and null status values, see the m_status member variable.

Example

// both set to 35.0050
COleCurrency cur1(35, 50);
COleCurrency cur2(35, 50);

// divide in half
cur1 /= 2;
ASSERT(cur1 == COleCurrency(17, 5025));

// multiply by two
cur2 *= 2;
ASSERT(cur2 == COleCurrency(70, 100));

Requirements

Header: afxdisp.h

See Also

COleCurrency Class
Hierarchy Chart
COleCurrency::operator *, /
COleCurrency::GetStatus