I\'m making a C++ Mind Reader program, which is nearly complete. However, it feels the need to skip the second cin. I\'ve searched and I\'m not exactly sure what\'s wrong. I
You can only input one word into a cin
. Instead, use getline(cin, string name);
If it still doesn't work, add a cin.ignore();
before your getline(cin, string name);
, like this:
string country;
cout << "Now please enter the country you are in at the moment:\n\n";
cin.ignore();
getline(cin, country);
This will now definitely work.