I have a problem. im trying to have it(it being this program ive writen), to when i press it, for example w for a piece of code to be preformed.
My code is as follows.
int loopprocess = 0;
int score = 0;
int keycomand = getch();
while (loopprocess == 0)
{
if (keycomand == 0)
{
keycomand = getch()+256;
switch (keycomand)
{
case 57:
score++;
break;
}
}
cout << score << endl;
system("cls");
i have no clue whats wrong i press w(57), but the score++; does not work. -_-
i learned this from this <daniweb> article [Click Here]
i have the aquired the ASCII code from Lookuptables.com Click Here
can you guys help me? please :)