C
Chris
Hi
The following code is giving strange results...........
float fTest = 536495.61f;
cout << _T("float: ") << fTest << endl;
int dec, sign;
char* pszTest = _fcvt(fTest, 10, &dec, &sign);
cout << _T("string: ") << pszTest << endl;
cout << _T("dec: ") << dec << endl;
cout << _T("sign: ") << sign << endl;
It seems that the stored value for the float is 536495.625 and not
536495.61........... Why?
And why would the "cout" of a float not give the digits after the floating
point?
Regards
Chris
The following code is giving strange results...........
float fTest = 536495.61f;
cout << _T("float: ") << fTest << endl;
int dec, sign;
char* pszTest = _fcvt(fTest, 10, &dec, &sign);
cout << _T("string: ") << pszTest << endl;
cout << _T("dec: ") << dec << endl;
cout << _T("sign: ") << sign << endl;
It seems that the stored value for the float is 536495.625 and not
536495.61........... Why?
And why would the "cout" of a float not give the digits after the floating
point?
Regards
Chris