Hi,
As per the msdn knowledge base.. i find the following
"In an application developed with Microsoft C or C/C++, the sscanf()
function is a good alternative to the atof() function to convert a string of
digits into a floating-point number. If a string does not represent a valid
number, atof() returns the value zero; sscanf() returns more useful error
information. The application can use the error value from sscanf() with the
matherr() function to perform error handling. The atof() function does not
call matherr() unless an actual math exception occurs. "
But even if the string is not correctly converted to float the _matherr()
function is not being called. Is this a bug or something wrong?
float f;
char temp[]="1mmm1";
int i=sscanf(temp,"%g",&f);
Here f get assigned with 1 instead i was looking for an error.
Any ideas how to solve this
Thanks
ishekara