detecting enter w/o locking display
Hey,
ok, first I must admit that this is homework - but I have tried to figure it out and have gotten nowhere in the last 6 hours (plus it is a small part of the overall project - building a virtual submarine)
I will use threads to allow different parts of the program to run concurrently. The change in status of each thread will be displayed for the user (example: depth). The user presses enter to lock the display and enter commands.
How do I check if the user has pressed enter without locking the display to get input from stdin?
Thanks in advance,
Dave.