#include std::string input; std::cin >> input;
The user wants to enter \"Hello World\". But cin fails at the spa
cin
The Standard Library provides an input function called ws, which consumes whitespace from an input stream. You can use it like this:
ws
std::string s; std::getline(std::cin >> std::ws, s);