How to multiply COleCurrency with float?
Posted on 2007-07-28
I would like to multiply a COleCurrency object with a float object and have the result as COleCurrency. What I've did is,
float interest = 6.75;
COleCurrency totalLoanAmount = loanAmount + (loanAmount * interest / 100);
I got the warning "conversion from 'float' to 'long', possible loss of data" when I compile. True enough, the result I obtained was multiplication with 6 and not 6.75.
Would like help on the correct method to do it.
COleCurrency loanAmount = 1000.00;
float interest = 6.79;