I'm doing a program on a quiz using DEV C++ and i want to set a countdown timer for it. As the user is doing the quiz, he's able to see the timer and once the timer reaches 0, the quiz automatically stops. Is it possible to do this? Thanks in advance for your views =D
themaestro
0
Newbie Poster
Recommended Answers
Jump to PostIts not possible to do this with just C++. But you can approximate it like so :
#include <iostream> #include <string> #include <ctime> using namespace std; int ask(const string& question){ cout << question; int ans = 0; cin >> ans; return ans; } int main(){ const int …
Jump to PostWell you can check after each answer if the time has been exceeded.
All 5 Replies
mrnutty
761
Senior Poster
themaestro
0
Newbie Poster
mrnutty
761
Senior Poster
Sci@phy
97
Posting Whiz in Training
viorel994
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.