I am just a beginner of C++ and trying to get a simple function done.
Lets say i have these first 3 lines:
int age;
cout<<"please enter your age"<<endl;
cin>>age;
I want this function to wait for 30 seconds, if there is any input of integer, function A is executed, else there is no input by the user and the time is up, function B is executed.
I know the function sleep works well for waiting, but the program waits until there is input, not stopping after 30 seconds.
Please help, thank you.