string to double (or float) conversion

I'm having trouble to do a string to double conversion. I have the
following simple code which doesn't work:

char *ch;
float f;
ch = "2345.235";
f = strtod (ch,NULL);

I compiled my code with a Glade make.  When i compile it with a simple
gcc command, it works.
I tried to set the environment variable LC_ALL to en_US
Is there a gtk function for this special purpose?

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]