View Single Post
  #1  
Old 03-26-2011, 08:50 PM
C++ C++ is offline
Senior Member
 
Join Date: Jun 2009
Posts: 18,248
Default for loop - ridiculous exception

just a simple for loop from 2 to 4(including for with increments 0.1 and 0.01. the problem is that when the increment is 0.1, the value of cur in last loop is 3.9; wheras, when increment=0.01 it is 4(as expected). all the variables are "double". any idea or suggestion?
__________________
C++
domain name forum
Reply With Quote