I have a situation-- CString str = "37.62"; double d, d1; d = atof(str); d1 = strtod(str, NULL); The results of both d and d1 are 37.619999999999997 (unexpected) what do i do to get d=37.62 and d1=37.62
U
User 3608241
@User 3608241
I have a situation-- CString str = "37.62"; double d, d1; d = atof(str); d1 = strtod(str, NULL); The results of both d and d1 are 37.619999999999997 (unexpected) what do i do to get d=37.62 and d1=37.62