I working with an application written in Visual Studio C++. Then program is a console application running under the DOS-prompt. The program is something like this.
void main ()
{
for ( ;; )
{
do_something ();
do_something_more ()
}
}
Now I need to add some code between do_something () and do_something_more () that checks if any key on the PC-s keyboard is pressed, and if so read that key. The problem is that the program must continue with do_something_more () if no key is used. I can not wait for the keypress, the program must continue executing as before if no key is pressed. I have not been able to figure out how to do this for this type of application. Anybody can give me a hint of how to do this?