COleCurrency::operator *=,/=

允许您通过一个整数值调用此 COleCurrency 值。

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

备注

如果 COleCurrency 操作数为空,则此 COleCurrency 对象的状态设置为null。

如果算术运算溢出,此 COleCurrency 对象的状态设置为无效。

如果 COleCurrency 操作数无效,此 COleCurrency 对象的状态设置为无效。

有关有效的更多信息,void和null状态值,请参见 m_status 成员变量。

示例

// 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));

要求

Header: afxdisp.h

请参见

参考

COleCurrency选件类

层次结构图

COleCurrency::operator *,/

COleCurrency::GetStatus