I wanted some code to get keyboard input and stumbled across getch(), to test it i wrote this code:
when you run the program and press a key such as the arrow keys, it displays 2 numbers instead of one. The first number is always 224, and the second is unique to each key. I know getch() returns the ascii value, and the buttons that return 2 numbers don't have an ascii character equated to them. My question is how can you read the second of the two numbers in something like an "if" statement? For example sensing the arrow keys through getch().
using namespace std;
int main(int argc, char *argv)
cout << y << "\n";