I was going to help this person, and in the course of writing a short demo realized I had not used strtof before and to my horror, am suddenly dumbfounded.
Which on my system yields:Code:#include <stdio.h> #include <stdlib.h> int main() { float X; const char fnum[]="13.666"; X=strtof(fnum,NULL); perror("strtof"); printf("%s\n%f\n",(char*)fnum,X); return 0; }
strtof: Success
13.666
1096460288.000000
Where's the catch???