I was wondering why this part of a switch function does not pause to get user input.
Can someone please provide some enlightenment. Thanks very much. I appreciate it.
cout << endl << "CREATE YOUR CHARACTER" << endl;
cout << "------------------------------" << endl << endl;
cout << "Enter your player's name: ";
cout << endl << endl;
It has nothing to do with switch, and all to do with "how input works". I'm pretty sure that somewhere shortly before the switch(input) line, you have something lileThis, like scanf() in C, will leave a newline in the input stream. You need to read that newline out of the input stream before you do getline() [since getline will read everything up to the next newline, and if there is already a newline in the input stream, it will say "Ah, ok, you didn't want anything else in the strign, then..."].
will do that.
Edit: Note, if someone fell asleep on the spacebar key and there are 1000+ spaces after the 1, then it will still fail. But I think that is unlikely enough to not worry about today - someone will surely show us how you make it "the largest ever number".