A
abdul_n_khan
I have a basic question related to datatype conversion. I am
multiplying currency to float datatype.
fltInterestRate=1.23333;
curAmount = 91000000;
curInterestAmount = curAmount * fltInterestRate
curInterestAmount should have 112233030
But i am getting 112230300 (thus I am loosing precision on the float
variable).
I tried to use typecasting but it didn't work and got compilation
error.
curAmount curInterestAmount are objects of class CCurrency whose
implementation is part of the project.
Any pointers in this context will be highly helpful.
multiplying currency to float datatype.
fltInterestRate=1.23333;
curAmount = 91000000;
curInterestAmount = curAmount * fltInterestRate
curInterestAmount should have 112233030
But i am getting 112230300 (thus I am loosing precision on the float
variable).
I tried to use typecasting but it didn't work and got compilation
error.
curAmount curInterestAmount are objects of class CCurrency whose
implementation is part of the project.
Any pointers in this context will be highly helpful.