I have a simple timer. It's in a function running in a thread separate from the main. Using std::future, the function returns a simple bool that says whether the timer has hit a specific number or not.
I am using getch(); to see if the user pressed a letter key.
If the timer returns true, that it hit a designated number, I need to cancel getch(); and move to the next step in the code. Moving to the next step is easy.
It's been 2 weeks and I can not find a solution to my problem.
The Problem: How on earth, can I interrupt or cancel a call to getch();? Is this even possible?
C++11 Visual Studio.
Aucun commentaire:
Enregistrer un commentaire