Alright, here's my problem.
After messing around with C++, I've came up with this little program:
Right?Code:#include <iostream> #include <windows.h> using namespace std; int main() { unsigned int secs = 0; unsigned int mins = 0; unsigned long int hours = 0; //Just in case the person's afk for a looong time :P int change = 0; cout<<"--AFK 1.0--\n\n"; cout<<"Press [ENTER] key to continue"; cin.get(); cout<<"\n\n"; while(change == 0) { cout<<"\t\nAFK for "<<hours<<" hours "<<mins<<" minutes "<<secs<<" seconds."; Sleep(1000); secs++; if (secs >= 60) { mins++; secs = 0; } if (mins >= 60) { hours++; mins = 0; } } return 0; }
Well, after Googling the heck out of this, I can't seem to come up with a definite solution aside from putting aabove the "AFK for" statement.Code:system("CLS");
What I mean is, having the seconds, minutes and hours change without having it display everything over and over again.
Also, if it helps, I am using Dev-C++ to compile all this.
Thank you very much for your time!