• Log in or sign up for an account here: https://www.sythe.org/login

What's wrong with this..

WoW Sucks

Grand Master

Banned
Joined
Jan 21, 2007
Sythe Gold
0
Messages
3,708
Age
36
Location
England
Code:
#include <iostream> 
#include <windows.h> 
using namespace std; 

int seconds = 60;
int minutes = 19;

 
void main(void) 
{ 
	
		
	 cout << "Your skull will be gone in: " << minutes << ":" << seconds << endl;
	 while ((seconds > 0) && (minutes > 0));
		 	 
     {
		 seconds--;
          Sleep(1000);
      
     }
     
	 if (seconds == 0)
		 minutes--;

	 if (minutes == 0)
		 cout << "Your Skull Should Have Gone" << endl;
     
}

Its meant to be a skull timer, ive been learning C++ for approx 1 hour, and ive tried to make this.

If its a complete failure, just tell me. If not, help please :)

Thanks.
 
I don't know c++, but I do know that in most, if not all, the if structures should be in this format:

if(this=="that")

Note the two equal signs.
 
Nope, not worked =/

Thanks anyway.
 
What about this?
Code:
#include <iostream.h>
#include <windows.h>

int main() {
int minutes = 20;
int sleeptime = minutes * 60 * 1000;
Sleep(sleeptime);
return 0;
}
 
Fixed, thanks to Cruel :)
 
Runescape Gamblingrunescape gambling
Back
Top