Skip navigation.
 
mlRe: how to convert char to int?
FROM : Shawn Erickson
DATE : Mon Nov 19 12:06:14 2007

On Nov 19, 2007, at 1:56 AM, amine ahmadi wrote:

> Dear All,
>
> I am looking for a source code that lets me convert
> the type char to the int type.


I encourage you to find a book on the C programming language.

char foo;
int bar;
foo = 'A';
bar = (int) foo;

...or do you want to convert a character string into a number? If so 
look at -[NSString stringWithFormat:], -[NSScanner scanInt:] or one of 
the low level C lib functions.

-Shawn

Related mailsAuthorDate
mlhow to convert char to int? amine ahmadi Nov 19, 10:56
mlRe: how to convert char to int? Alastair Houghton Nov 19, 11:43
mlRe: how to convert char to int? Dominik Pich Nov 19, 11:48
mlRe: how to convert char to int? Shawn Erickson Nov 19, 12:06