Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - atof http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   atof

   Usage
   #include <stdlib.h>
   double atof(const char *nptr);

   Description
   This  converts the string pointed to by nptr into  a  double-precision
   floating point number. The string may have leading spaces, tabs, and +
   or  -. Conversion stops on the first unrecognized character. If  there
   are no recognized characters, the result is 0.

   Example
   #include <stdio.h>
   #include <stdlib.h>
   main()
   {
        printf("atof function = %e\n",atof("123.5e15"));
   }

   Return Value
   Returns  the double value derived from converting the string. Zero  is
   returned   if  the  input  string  does  not  have  any   recognizable
   characters.


See Also: atoi atol ecvt fcvt strtol strtod scanf

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson