Quote:
getch","getche" and "getchar"but none of them seem to serve my purpose...
Actually ALL of them return the
ASCII
code of the input character (So what is your purpose?).
[Update]
Please note the
decimal ESC
code is
27
. You are using its
octal value in a decimal constant (in
C
an octal constant must be
0-prefixed
, that is
033
).
Anyway intercepting
ESC
is tricky (I got
146
on my console application). I suggest you to use
'q'
or something else).
[/Update]
By the way, your code looks a bit messy.