Archived

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

A Question About ASCII Characters In VC++ 6

This topic is 5001 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 would just like to know how I can type all ASCII characters in VC++ 6 cause it seems that when I''m using keyboard combinations (i.e Alt + 165), different characters show up. Also, not all of my reference about ASCII characters are consistent. Well that''s about it. THANKS IN ADVANCE!!

Share this post


Link to post
Share on other sites
Hi,

Graveyard Filla, I didn''t mean couting a character with an integer input. What I mean is, for example if I''m going to do:

cout << char(1);

what will appear here is the smiley character. My question is how can I type that smiley character? Thanks anyway. If anyone knows how (not just the smiley character but the whole ASCII characters w/ some exceptions such as null), please let me know. THANKS AGAIN IN ADVANCE!!

Share this post


Link to post
Share on other sites
You can''t, really. ASCII characters under 32 are usually not displayable in Windows (I''m assuming that''s what you use).

What is it you want to do, exactly? There may be an alternative solution.

Share this post


Link to post
Share on other sites
Hi again,

I''m Sorry if it sounded unclear. Anyway, I''m using it as a tile editor meaning that one particular character pertains to a particular tile. The problem is I can only use the characters of the alphabet (a-z and A-Z) plus the numbers and symbols (SHIFT + whatever no.) and it''s not enough to supply my tiles that''s why I need at least 160 characters and I don''t want my tile editor to be of type int cause it''s harder to initialize. Here''s what I''m getting into:

//Here''s the editor using a character pointer

char *stage[3] =
{"00000",
"00000",
"00000"};

If I want larger sets of numbers then I''ll go with an array integer but it''s pretty hard to initialize

int stage[3][5] =
{4,4,4,4,4,
3,3,3,3,3,
2,2,2,2,2};

Not to mention that if it''s a double digit or triple digit number then my editor would look jagged and hard to edit. Of course it''s not just a 3x5 size (for the sake of clarity). Is there any website that posts all the ASCII characters so I can just copy-paste it in VC++.

Share this post


Link to post
Share on other sites
int initialization might be more of a pain to you, but it's much better suited to what your trying to do. Though if you want to use arrays of cstrings to hold your many tiles, you can just use tile sets. Where the first few bytes are just specifying what tile set the want. For example -> char *stage[5]= "000xa",
"11111",
"12121",
"21212",
"12221";

If you want to have multiple tilesets for a single part of your level, just have a universal tile code designated to be transparent.

[edited by - xorjesus on April 6, 2004 12:56:03 PM]

Share this post


Link to post
Share on other sites