Control-C causes error before kbhit() can handle input

  • Thread starter Thread starter timetraveldude
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 7K views
timetraveldude
Messages
42
Reaction score
0
I have a programming running that waits for keyboard input. The problem is that when I press control-C to exit the program I get an error. I believe it is because the keyboard was pressed but the program is exiting before it can execute the code that is called when kbhit() is true. Any ideas.<br />
<br />
thanks.
 
Physics news on Phys.org
thanks

thanks for the help.