0

How do I take input from user in a loop without stoping loop?

I mean, I want to make my own timer that counts to 15s. It works good but in any moment between 0s and 15s, a user should enter an number, however... When cin is called the timer stops... Any idea about how to do that? https://code.sololearn.com/cksak2790NSO/?ref=app

19th Sep 2022, 4:22 PM
Marco CĂĄrdenas
Marco CĂĄrdenas - avatar
2 Answers
+ 2
Use threads learn how to use them here https://www.geeksforgeeks.org/multithreading-in-cpp/
19th Sep 2022, 4:45 PM
boolean
boolean - avatar
+ 1
boolean Tyvm It's a good way 😊... I can do what a want
19th Sep 2022, 7:43 PM
Marco CĂĄrdenas
Marco CĂĄrdenas - avatar