alan_ri |
06-25-2008 07:09 AM |
Welcome!
Will this help you;
Code:
#include <string.h>
#include <stdio.h>
int main()
{
char szTemp[10];
int nNumber = 0;
strcpy(szTemp, "10");
// Convert the string to number.
nNumber = atoi(szTemp);
printf("The converted number is : %d \n",nNumber);
return 0;
}
Also I've found this site while searching a little,it has some nice things.Anyway you could search yourself a little,because there are so many guides,tutorials and books about C on the net that will help you understand C much better and we have Programming forum here,so you could've started your thread there and searched it a little too.
|