Thread: Jr Dev Code
View Single Post
  #19  
Old 06-07-2004, 01:46 AM
Kambic
Sarnak
 
Join Date: May 2003
Posts: 35
Default

Quote:
Quote:
Kambic wrote:
#include <iostream>
#include <string>
using namespace std;

int main()
{
string answer;


while (answer != "Y")
{
cout << "Should Kambic be the next EQEmu Developer?" << endl;
cout << "Please type Y for 'Yes' or N for 'No':" << endl;
cin >> answer;
if (answer != "Y")
{
cout << "die irl plz" << endl;
}

}
cout << "you are teh WIN !!!" << endl;

return 0;
}
N -- Oh btw, it will always return the "you are teh WIN !!!" line because you didn't include "return 0;" in your if statement. So i r teh WIN !!!
Of course it will. But not until you answer Y. Until you answer Y to my question, the program loops endlessly. Ahh, my pressssciousss... yesssss.....
__________________
Sojourneying on the Path to Eternity...
Reply With Quote