Thanks.
ASCII Text
Started by Anonymous Poster_Anonymous Poster_*, Oct 12 1999 06:49 AM
4 replies to this topic
#1 Anonymous Poster_Anonymous Poster_* Guests - Reputation:
Posted 12 October 1999 - 06:49 AM
First of all, in case you need to know, I'm using Visual C++ 6.0 and am making a Win32 app with no Direct X. Well, my question is how do you display ASCII text? I can get the 1st 175 ASCII characters by putting it directly into the compiler's editor by holding alt and then putting in the ASCII code but beyond that it doesn't seem to work at all. How do you display ASCII characters beyond 175?
Sponsor:
#2 Members - Reputation: 629
Posted 07 October 1999 - 02:47 PM
Just use the number that corresponds to the character in a printf() statement:
printf("this is a \225eta version\n");
would read "this is a Beta version"
The \nnn will give you the ascii character for the value.
Otherwise you can do:
printf("This is a %ceta version\n", 225);
where %c is 225 turned into a char representation.
#3 Members - Reputation: 130
Posted 09 October 1999 - 02:43 AM
\225 will NOT print the ASCII character #225. Rather, it will print #149, because \ooo is the escape sequence to write octal numbers.
Dunno where you got that \nnn thing. It's not in ANSI C. If it's a part of ANSI C++ then I apologize 
So I suggest to spheltem to use \xhh instead, which lets you write a hex byte. For character #225 you would write "\xe1"






