#include std::string input; std::cin >> input;
The user wants to enter \"Hello World\". But cin fails at the spa
cin
You have to use cin.getline():
char input[100]; cin.getline(input,sizeof(input));