For a reason i don't know, if i convert a float to a cstring, it does not convert to an exact value for all values except round numbers or 1/2 numbers;
the following code (used to convert and later show as text in a MFC Document)
output
float i_A11 = 1,2 and once converted to Cstring SA11 = "1.20000004 768"
float i_A11 = 1,0 and once converted to Cstring SA11 = "1."
float i_A11 = 1,5 and once converted to Cstring SA11 = "1.5"
thanks in advance for the help!
the following code (used to convert and later show as text in a MFC Document)
Code:
char buffer1[_CVTBUFSIZE]; _gcvt(i_A11, 12, buffer1); CString SA11 = (CString) buffer1;
float i_A11 = 1,2 and once converted to Cstring SA11 = "1.20000004 768"
float i_A11 = 1,0 and once converted to Cstring SA11 = "1."
float i_A11 = 1,5 and once converted to Cstring SA11 = "1.5"
thanks in advance for the help!
Comment