Hey everyone,
Today's question is sponsored by the topic of vectors and the letter h for "help"...
So, I'm using a vector of strings to accept user input. My code takes the users input and inserts it into the vector using the string variable with the user input as the argument passed into push_back():
Well what happens is any single word input is used properly and everyone's happy but once it goes to multiple words it prints the 1st word and sends a blank field to the next iteration of the loop the whole thing is in (indicating the problem is with my cin statement...hwoever cin.get only accepts chars it seems...so any help would be awesome...)-ChapCode:string gameChoice; //...some if else statements and a while statement follow... cout << "\nEnter the name of your favorite game: "; cin >> gameChoice; gameList.push_back(gameChoice);
By the way...did anyone else have any problems getting onto this website? I've been trying for the past 2 days but I was just getting an eternally loading homepage...just curious if anyone else was having trouble...