Okay, I made a really bad program just to mess around with moving something on the screen, I have two problems, first when I use the ASCII 219(That's the block on right?) it is some vowel with a tilde above it... also how can I have the user enter a key without having to have them push enter?
Code:
// Written by Phillip Hermans
// Runnin' 'round!
// Started Feburary 17, 2003
#include <iostream.h>
#include <conio.h>
int main()
{
int x = 5, y = 5,sent = 1;
char ent;
cout << "To stop playing hit 0 then enter, to move hit a direction(W,A,S,D) then enter!" << endl;
gotoxy(x,y);
cout << char(219);
while(ent != 0)
{
cin >> ent;
switch(ent)
{
case 'w':
case 'W': y--; break;
case 's':
case 'S': y++; break;
case 'd':
case 'D': x++; break;
case 'a':
case 'A': x--; break;
case '0': return 0;
default: cout << "YOU BROKE IT!";
}
clrscr();
gotoxy(1,1);
cout << "To stop enter 0";
gotoxy(x,y);
cout << char(219);
}
return 0;
}