My float variable contain .11 and I don't get the desired result of 11 from multiplication but simply numerica value .11 works.
I tried various typcasting but it always is .10 when I use the float variable. How can I get the correct result?Code:short int test = .11 * 100; // test is right 11. // case 2 float fVal = .11; short int test = fVal * 100; // now test is .10
updated:
compiler is VC++ 2005




Reply With Quote