This question already has an answer here:
- Is it possible to set timeout for std::cin? 2 answers
- making auto timeout with std::cin statement 2 answers
So, I am making a game, and I need input function to have deadline, and I want that time to be displayed in one of the console corners. I have timer running on separate thread, but I do not know how to interupt input function when it finishes. Also, as I mentioned I want to show user how much time he has left, lets say to write varibale TimeLeft on end of the first line,but keep all other lines intact. Any help would be appriciated. Working in C++, Windows platform, console app