ive been writing a c++ program to make a quiz but i couldn't figure out about how u can put a timer.
the timer should actually countdown from 20 to 1 and once the time is over it has 2 move on to the next question and no points should b given 4 that question.

can someone write out a code and explain the logic to me.

p.s in the code please include a question

10 Years
Discussion Span
Last Post by Ancient Dragon

you have to put the timer code in a second thread then when someone types something in thread1 kill the timer thread. How to construct new threads depends on the operating system.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.