Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

dangerduo

How can i view ASCII chars in winXP?

This topic is 5617 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have to create a game for my data structure class as a final project. Well, i decided to use some ASCII to do the drawing, I have to draw a grid, so i decided to use decimal 125, i believe is a bar..? Well, anyway, when i write a short loop program to display the ASCII characters, it is weird. It is not what i exepected. The characters are in some other characters which i can''t figure out what it is. Is there something wrong with my system? Or do I have to config my XP in order to view ASCII char correctly? Thank you.

Share this post


Link to post
Share on other sites
Advertisement
Show us some code.
This works:


  
#include <stdio.h>

void main() {
char cAscii = 124; //124 == | 125 == }

printf("The ascii value is %c\n",cAscii);
}
/*
OUTPUT
The ascii value is |
Press any key to continue
*/



[edited by - kordova on March 4, 2003 8:59:34 PM]

Share this post


Link to post
Share on other sites
you might have to change the font... some fonts do not use the same upper 128 characters that you would expect.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!