CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Guest

    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.




  2. #2
    Join Date
    Apr 1999
    Posts
    25

    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.


  3. #3
    Join Date
    May 1999
    Location
    Texas, USA
    Posts
    568

    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



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured