I am using a switch case statement in C to detect what the user presses at the keyboard. I've got it to work with everything except the arrow keys and the number-pad because I don't know their ASCII codes (if any). Here is an example
what would I put into "blah"Code:#include <stdio.h> #include <conio.h> void main() { char key; key=toupper(getch()); switch(key) { case 32: printf("You hit the spacebar!"); getchar(); break; } }
case "blah":
for arrow keys?