|
Console Junkie
Join Date: Jun 2006
Location: USA
Posts: 991
|
Re: How to Draw lines in C/C++?
^^ It's for a game of Tic-Tac-Toe. I just want to draw a 3X3 block of squares.
The code I used in windows is as follows :
Code:
printf("\n\n\n");
printf("\n\t\t\t\t%c%c%c%c%c%c%c%c%c%c%c%c%c",218,196,196,196,194,196,196,196,194,196,196,196,191);
printf("\n\t\t\t\t%c ",179);
printf("%c",game[0][0]);
printf(" %c ",179);
printf("%c",game[0][1]);
printf(" %c ",179);
printf("%c",game[0][2]);
printf(" %c ",179);
printf("\n\t\t\t\t%c%c%c%c%c%c%c%c%c%c%c%c%c",195,196,196,196,197,196,196,196,197,196,196,196,180);
printf("\n\t\t\t\t%c ",179);
printf("%c",game[1][0]);
printf(" %c ",179);
printf("%c",game[1][1]);
printf(" %c ",179);
printf("%c",game[1][2]);
printf(" %c ",179);
printf("\n\t\t\t\t%c%c%c%c%c%c%c%c%c%c%c%c%c",195,196,196,196,197,196,196,196,197,196,196,196,180);
printf("\n\t\t\t\t%c ",179);
printf("%c",game[2][0]);
printf(" %c ",179);
printf("%c",game[2][1]);
printf(" %c ",179);
printf("%c",game[2][2]);
printf(" %c ",179);
printf("\n\t\t\t\t%c%c%c%c%c%c%c%c%c%c%c%c%c",192,196,196,196,193,196,196,196,193,196,196,196,217);
and when I use the same in linux, all I get is a strange combination of question marks and blanks.
So I wrote a program to find the ASCII values of the respective numbers, I found that lines are not there. The character set ends at 120 or so, there is nothing after that number but question marks.
Aditya
__________________
--- Console Junkie
|