I am trying to get the object (@) able to move up, down, left, and right but i made a mistake couple places in this code (below) will someone tell me whats wrong????
#include
#include
#include
const char K_DOWN = 0x50;
const char K_LEFT = 0x4B;
const char K_UP = 0x48;
const char K_RIGHT = 0x4D;
int main(void)
{
char c=0;
while(c != 27)
{
c=getch();
if(c==K_DOWN)
{
gotoxy(x,y);
putch(" ");
y++++;
gotoxy(x,y);
putch("@")
}
if(c==K_UP)
{
gotoxy(x,y);
putch(" ");//get rid of tracks
y----;
gotoxy(x,y);
putch("@")
}
if( c== K_RIGHT)
{
gotoxy(x,y);
putch(" ");//get rid of tracks
x++++;
gotoxy(x,y);
putch("@")
}
if(c==K_LEFT)
{
gotoxy(x,y);
putch(" ");//get rid of tracks
x----;
gotoxy(x,y);
putch("@")
}
}
return(0);
}