Character to Decimal Conversion

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Character to Decimal Conversion

3,706 Views
GangaPrasad
Contributor I
Hi everybody,
I am pretty new to this forum.
Can anybody know how to convert character to decimal in codewarrior development studio(in C).
Hope I asked my question in a right way.
 
Thanks,
Ganga
Labels (1)
0 Kudos
Reply
1 Reply

567 Views
alex_spotw
Contributor III
Hi:

Like in any ANSI C compiler, you have access to the functions atoi() (in the library stdlib.h), which takes a string as argument and returns the equivalent integer (int) value:


int StringToInteger( char *str)
{
return atoi(str);
}


Regards,

Alex
0 Kudos
Reply