Find out with the code below what values the keys return
my system returns something like
72,75,80 and something else....
Most keys place only one value in the buffer... the arrow keys however place 2 224, ? depending on which arrow key was pressed. That is why I test for the value 224. Your system may or may not place that value there....
int i = getch();
if( i == '0')
if( i == 224 ) //whenever an arrow key is pressse my
i = getch(); //system returns 224 prior to the key val
cout << "You pressed key number: " << i << endl;