Hi ! Today I finished my C++ book, and i started with SFML. I tried to learn Threads,but I dont know how to use them right. My question is : How can I make a program that wait 10 seconds for a int to be inputted,and print something if the int was entered or something else if the int was not entered...
I though so:
A thread that Sleep(10000)'s,using Windows.h and a thread that cin's a number.The number is passed to the thread by reference.At the end of the sleep-thread I want to stop the input thread,but than I discovered that the thread cannot be stopped
. How can I do this , using SFML threads ?
Thanks in advance