COleCurrency::operator *, /

COleCurrency operator *( long nOperand ) const;

COleCurrency operator /( long nOperand ) const;

Remarks

These operators allow you to scale a COleCurrency value by an integral value.

If the COleCurrency operand is null, the status of the resulting COleCurrency value is null.

If the arithmetic operation overflows or underflows, the status of the resulting COleCurrency value is invalid.

If the COleCurrency operand is invalid, the status of the resulting COleCurrency value is invalid.

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

Example

// 35 units and 50/10000, or 35.0050
COleCurrency cur1(35, 50);
COleCurrency cur2;

// divided by two is 17.5025
cur2 = cur1 / 2;
ASSERT(cur2 == COleCurrency(17, 5025));

// multiplied by two is 70.0100
cur2 = cur1 * 2;
ASSERT(cur2 == COleCurrency(70, 100));

COleCurrency OverviewClass MembersHierarchy Chart

See Also   COleCurrency::operator *=, /=, COleCurrency::GetStatus