Ok, i know how to create a very simple countdown timer:
But my question to you guys is if there is a way to perform other things in my program while waiting for the timer to finish. If possible, could you please explain? thanks in advance.Code:#include <cstdlib> #include <iostream> #include <windows.h> #include <conio.h> using namespace std; void clrscr() { system("cls"); } main() { unsigned int timer; cout << "Timer Set To: "; cin >> timer; for (timer>0;timer--;) { Sleep(1000); } system("PAUSE"); return EXIT_SUCCESS; }
btw, i joined the site in 2006 and am back... so yay... lol.



Reply With Quote




Bookmarks