i�m making a program, and i would like to know how can i know what key was pressed. i'm using Sun5.7 and C.
is there a keypress/keypressed function in C?
how can i know recognize the keys (enter, tab, shift, etc.)?
can i recognize two keys ? (shift+A, ctrl+C, etc)
Consider using int ch because getch returns an int. In the same vein, main()
returns an int - per C standard. After void main() executes, the value of the command line paramter $? can be literally anything - if it's zero then it's pure luck that it was zero. You can crash scripts by calling void main() C from them.