#include <stdlib.h>
|
double
atof (const char *nptr); |
It is equivalent to:
strtod(nptr, (char **)NULL);
The decimal point character is defined in the programs locale (category LC_NUMERIC).
#include <stdlib.h> #include <stdio.h> void main( void ) { /* Test of atof */ double d = atof(" 86778E-2"); printf( "result of atof: %f\n", d ); }
Output
result of atof: 867.78
The atof function has been deprecated by strtod and its use is not preferred.
© 2008 Nokia Corporation. All rights reserved. This documentation can be used in the connection with this Product to help and support the user. |