I need a program to make that if something (for example, a char) is entered from cin within a certain amount of time, it reads it, but if nothing is entered, it doesn't wait and continues with the program.
1. Create a new thread.
2. Start a timer using your OS API (or maybe boost) in the original thread
3. Use the std::cin object in the new thread.
4. When the timer expires in the original thread, delete the new thread.