COleCurrency: How do I multiply?
How do I muliply one currency variable with another. As when I do m_Amount = m_1 * m_2 it gives me :
binary '*' : no opera no operator defined which takes a right-hand operand of type 'class COleCurrency' (or there is no acceptable conversion)
It will add up properly m_1 + m_2, but will not multiply.
Re: COleCurrency: How do I multiply?
Hello,
A COleCurrency object actually hides a CURRENCY type variable. You can multiply them, if you like. Check the class definition or data members of COLeCurrency from the VC++ help.
Re: COleCurrency: How do I multiply?
I have not used the COleCurrency class before but if you have
two CURRENCY structures to multiply them is as follows:
CY cyLeft;
CY cyRight;
CY cyProduct;
VarCyMul(cyLeft, cyRight, &cyProduct);
Hope that helps,
Wayne