Hey this is my first post here so high everybody! OK, now that greetings are out of the way I can tell you guys (or gals) my problem. So, I've compiled everything without error and i can't run my program until I type something and press enter. There is more to the progrm than just typing one thing and I even put 'cin.ignore()' at the end. I'm not sure what to do. (Oh and by the way my program is a text-based game).
-Arby
p.s. Here's my code
I know it's a stupid idea me and my friend were high (am I allowed to say that?) when we thought of it but I was bored and decided to do it.Code:#include <iostream.h> using namespace std; int main() { int b; char string[3]; //going to make a text game called "Mrs. Jones Pro Student"; cout<<"Please enter your initials \n"; cin.getline ( string, 3, '\n' ); cout<<"Welcome "<< string<<"! You are about to begin the exciting adventure of MRS. JONES PRO STUDENT!!!\n" "Mrs. Jones is an evil religion teacher at St.Catharine's elementary school.\n" "She is obbsesed with making sure that her students keep their shirts tuck in!\n" "Are you ready to begin?\n"; cin>> b; if ( b == 1 ) {cout<<"Than let us begin.\n";} else if ( b == 0 ) {cout<<"THE END\n";} else {cout<<"I don't understand, please use 1 for yes and 0 for no\n";} cin.ignore(); }