Aug 13, 2002 #1 EauDeNil Programmer Aug 13, 2002 1 US I'm looking for a way to run through a character array and get the ascii code numbers for each letter.
I'm looking for a way to run through a character array and get the ascii code numbers for each letter.
Aug 14, 2002 #2 Leibnitz Programmer Apr 6, 2001 393 CA you can do it like this: Code: #include <ctype.h> ..... ... char *str = "hello world !"; for( int i = 0; str[i] != 0; i++) { __toascii( str[i] ); } .... Upvote 0 Downvote
you can do it like this: Code: #include <ctype.h> ..... ... char *str = "hello world !"; for( int i = 0; str[i] != 0; i++) { __toascii( str[i] ); } ....
Aug 15, 2002 #3 xwb Programmer Jul 11, 2002 6,828 GB char* astr = "ropey"; for (int i = 0; astr; i++) printf ("%d ", (int) astr); Upvote 0 Downvote