I have two sample applications using the same library, and the main difference between the two is that one uses qt and the other application is a console application.
In the shared library, I have this test code:
double test = 0.1; double test2 = atof("2.13134"); double test3 = atof("1,12345");
Values if I use a non-qt application:
test = 0.10000000000001 test2 = 2.1323399999999999998 test3 = 1 // This is the expected result using a ',' as delimitation character
But with qt app:
test = 0.10000000000001 test2 = 2 // This is not expected!!! test3 = 1.1234500000000000001
Is there a case where the "atof" behavior changes because qt?
c ++ qt atof
goe
source share