cpp get whole line input code example
Example: how to read a line from the console in c++
#include <string>
std::string str;
std::getline(std::cin, str);
// The output of std::getline(std::cin, str) will be stored in str.
#include <string>
std::string str;
std::getline(std::cin, str);
// The output of std::getline(std::cin, str) will be stored in str.