I believe you're looking for getch(). getch() will return a numerical value based on the keyboard key that was hit. I believe, however, that with the arrow keys, it returns two values.
So, if you press an arrow key, I believe the first call to getch() will return a 224, whereas the second call returns the numerical value of the arrow key.....you'll have to do some testing of this on your own, something like so:
I can't remember exactly if 224 is actually the number that it returns for the arrow keys....so don't quote on me on that, but at least test it out.
// process the arrow keys here....and some other buttons
// process the other keys here
forgot about the FAQ...it's 224 not 227. Sorry bout that, haven't used getch in ages.