| View previous topic :: View next topic |
| Author |
Message |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Mon Feb 28, 2011 11:33 am Post subject: WHY WON'T THIS BUILD! |
|
|
| Code: | // Guess The Number, by James Fisher
// Include the libraries
#include <iostream>
#include <ctime>
//Use the standard namespace
using namespace std;
void main ( )
{
//Seed the random number
srand (time (NULL) );
//Declare the variables
int Secret_Number = rand ( ) % 100 + 1;
int Guess = 0;
while (Guess != Secret_Number)
{
//This code repeats until the condition is no longer true
// Get the user's guess
cout << "Guess the secret number." << endl;
cin >> Guess;
//If the guess is too high, tell the user
if (Guess > Secret_Number)
{
cout <<"Your guess is too high." << endl;
}
// If the guess is too low, tell the user
if (Guess < Secret_Number)
{
cout <<"Your guess is too low." << endl;
}
//If the user guessed the right number, congratulate them
if (Guess == Secret_Number)
{
cout <<"Good job! You guessed the secret number!" << endl;
}
}
system ("PAUSE");
} |
I've spent an hour trying to figure out what's wrong with it.
Could someone else try running it?
_________________
It was nice while it lasted. |
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Mon Feb 28, 2011 11:36 am Post subject: |
|
|
works perfectly bro
I am using visual dev cee plus plus borderlands
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Mon Feb 28, 2011 11:36 am Post subject: |
|
|
What type of project did you use?
_________________
It was nice while it lasted. |
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Mon Feb 28, 2011 11:38 am Post subject: |
|
|
| Haxory' wrote: | works perfectly bro
I am using visual dev cee plus plus borderlands |
Youre using Borderlands?
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Mon Feb 28, 2011 11:39 am Post subject: |
|
|
| The Fish wrote: | | What type of project did you use? |
| Quote: | | visual dev cee plus plus borderlands |
Sorry bro I was trolling ;-;
Wish I could help here.
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Mon Feb 28, 2011 11:41 am Post subject: |
|
|
"PAUSE"? Also, you could compile it and tell use the error the compiler gives you idiot.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Mon Feb 28, 2011 11:43 am Post subject: |
|
|
Got it working.
_________________
It was nice while it lasted. |
|
| Back to top |
|
 |
Aviar³ Grandmaster Cheater
Reputation: 50
Joined: 03 Jan 2008 Posts: 655 Location: Canada
|
Posted: Mon Feb 28, 2011 11:45 am Post subject: |
|
|
This is where you tell us what the problem is so others can learn.
_________________
This is the inception of deception, checking the depth of your perception.
 |
|
| Back to top |
|
 |
The Fish Expert Cheater
Reputation: 3
Joined: 11 Aug 2008 Posts: 114 Location: Ohio bitch
|
Posted: Mon Feb 28, 2011 11:46 am Post subject: |
|
|
I wasn't using a win32 console application.
I was using a CLR console application.
_________________
It was nice while it lasted. |
|
| Back to top |
|
 |
Haxory' Grandmaster Cheater Supreme
Reputation: 92
Joined: 30 Jul 2007 Posts: 1900
|
Posted: Mon Feb 28, 2011 11:47 am Post subject: |
|
|
| Aviar³ wrote: | | This is where you tell us what the problem is so others can learn. |
Such an eager to learning, eager to spreading knowledge even person.
People learn by this mans example.
_________________
you and me baby ain't nothing but mammals so lets do it like they do on the discovery channel |
|
| Back to top |
|
 |
|