I need to convert part of a character array into integer and am wondering how.
How to convert string into integer ?
How to convert string into content of a character array ?
I ask these questions because I think the atoi thing on C++.com may be able to do these. It need an entire character array but in my case, I only need part of a character array for conversion to integer.
This is the example on c++.com:
/* atoi example */
int main ()
char szInput ;
printf ("Enter a number: ");
gets ( szInput );
i = atoi (szInput);
printf ("Value entered is %d, and its double %d",i,i*2);
Enter a number: 73
Value entered is 73, and its double 146