I want the output to say what arrow key the user pressed. The output I get is:
"You pressed the Dz↕ button."
What I wrote was:
unsigned int key;
string K;
do
{
key = getch();
if (key==72)
K=" up";
else if(key==80)
K="down";
else if (key==77)
K="right";
else if (key==75)
K="left";
else
{}
if (key!=224)
printf("You pressed the %s button.\n", K);
else
{}
}while(key !='q');
return;