Hi guys, I'm trying to learn C++, and I'm just wondering what the deal is with this:
The problem is when a user enters a string of more than 1 word, it'll only print the first. I.E say I enter "Hello there" it will say "You entered: Hello" instead of "You entered: Hello there". I'm guessing cin doesn't read whitespace or something, so I'm just wondering what is the way around this... Ok thanks!
std::cout << "Please enter a string: ";
std::cin >> s;
std::cout << "\nYou entered: " << s << "\n";