Joona I Palaste <pa*****@cc.hel sinki.fi> writes:
Marky C <eg*********@ho tmail.com> scribbled the following: atof is not working.
double a = atof("12.345");
a gets set to 12.000
I am working on a toshiba micro. The data map has no space allocated
to it for dynamic memory.
Does anyone have an idea? Could it be due to the lack of dynamic
memmor space?
Am I the only person who can't understand why the topic is about strtod
but the message is about atof?
C99 7.20.1.1, The atof function:
The atof function converts the initial portion of the string
pointed to by nptr to double representation. Except for the
behavior on error, it is equivalent to
strtod(nptr, (char **)NULL)
--
Keith Thompson (The_Other_Keit h)
ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
Schroedinger does Shakespeare: "To be *and* not to be"