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 - atoi http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   atoi

   Usage
   #include <stdlib.h>
   int atoi(const char *nptr);

   Description
   This  converts  the  string pointed to by nptr into  an  integer.  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("atoi function = %d\n",atoi("153"));
   }

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


See Also: atof atol ecvt fcvt strtol strtod scanf

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