hi
i have an array like this :
char x[3]={'1','2','3};
i want convert the array to int number like this:
123(the type of it , is int)
can you help me?
What a way to offer me ?
thanks alot
Last edited on
An easy way would be to do something like this
atoi(x);
just make sure your last char is null like this, if you plan to use atoi():
char x[4]={ '1', '2', '3', '\0' };