
Originally Posted by
gordonm
Code:
int MyGuess(0);
int Bob(1234);
The preferred form is:
Code:
int MyGuess = 0;
int Bob = 1234;

Originally Posted by
gordonm
Code:
srand(time(NULL));
//guess = rand()%10+1;
The game would be a little harder if you uncommented this line and changed "guess" to "Bob".

Originally Posted by
gordonm
Code:
cout << "wrong ,try again!!!\n";
cout << "you guessed " << MyGuess << " and you fail! here is what you should have got ";
cout << Bob << "\n";
No need to repeat yourself.
Code:
cout << "wrong ,try again!!!\n"
<< "you guessed " << MyGuess << " and you fail! here is what you should have got "
<< Bob << "\n";

Originally Posted by
gordonm
You windows junkie. Just make sure you don't use system("PAUSE") for anything but the most trivial programs that are just for yourself. If anyone else is involved, use cin.ignore().