Advertisement

cout<<ASCII ?

Started by January 11, 2003 10:22 AM
3 comments, last by DefCom 21 years, 10 months ago
An easy question i am embarrassed to ask. I would like to output ascii characters in console mode. If anyone could refresh my memory on how to do this i would be extremely grateful, Thanks.
i suppose you mean something like this:
cout <<"your messgage here" <
[edited by - Spudder on January 11, 2003 11:32:47 AM]

[edited by - Spudder on January 11, 2003 11:33:05 AM]
Advertisement
Sorry no, I mean if you look through an ASCII chart there are smiley faces and other such usefull symbols.
Try this:

  for( int ascii = 0; ascii < 256; ascii++ ){    std::cout << (char)ascii << std::endl;}  


[edited by - baumep on January 11, 2003 11:43:38 AM]
baumep
That''s just what i required, Thanks.
I am working on some pathfinding algorithms and i wanted to demonstrate them in the simplest possible way. Using numbers for walls was getting boring to look at, thanks again.

This topic is closed to new replies.

Advertisement