I’m looking for a pretty simple thing:
I want to test if a key was pressed. any key.
If not, the program should continue its business.
So it must be a "non blocking" call.
I guess this question is probably equivalent to checking if the keyboard buffer has anything into it.
I guess such a function must exist in C for that, but I can’t quite find it yet. All standard functions I find are "blocking" type, waiting for a key to be pressed before answering.
Note – I’m planning to use it for a Windows console program.
In windows you can use ‘_kbhit()’ in conio.h
It is a non-standard function and may not be available on other platforms.