-
ASCII - I think?
Hello,
I am trying to make a box.. now, everything looks good except I can't find a good way to make the corners.. I have seen people use 4 corners (I guess there ascii) so I was wondering what the ALT code was for that, or maybe char(somthing).. any help would be nice..
right now I have
_____________
| x x x x x x x x x |
| x x x x x x x x x |
| x x x x x x x x x |
| x x x x x x x x x |
|_____________|
-
A very crude method using iostream alone would be to use the hex value of the characters that you want to display. For example
cout << "\xC9"; // double line upper left corner
cout << "\xDA"; // single line upper left corner
for(int line = 1; line <=10; line++)
cout << "\xCD" // draw a horizontal line.
-
The single upper left corner shall work perfectly.. by chance, do you have the single right, bottom left, and bottom right..
also by chance the hex of |
-
single line box:
0xDA 0xC4 0xBF
0xB3 0xB3
0xC0 0xC4 0xD9
-
You can do the same thing using unsigned char. Take a look into the ascii codes in many programming books.
unsigned char drawme;
drawme = 218;
cout << drawme;
I've never had a problem with box characters. Must be user error :D