#include <iostream>
#include <string>

int main()
{
    std::cout << "Enter any string at all, even if it includes spaces or is very long: " << std::flush;
    std::string text;
    if(std::getline(std::cin, text))
    {
        std::cout << "Thanks! You said \"" << text << "\"." << std::endl;
    }
    else
    {
        std::cout << "Something went wrong, I didn't quite catch that." << std::endl;
    }
}
