getch() and other keyboard input functions return two integers for all special keys, such as arrow keys and function keys (F1, F2, ... F10). When getch() returns 0 or 224 as the first value, then a special key was pressed and the program must call getch() again to get the key's integer value. That integer value duplicates one of the standard ascii values of other keys and your program may have to should encode it to make it distingushable from normal ascii keys. I normally make it a negative value, but other programmers may add 255 to it.
Code:
int key;
key = getch();
if(key == 0 || key == 224)
{
key = getch() + 255;
}