std::getline reads an entire line from an input stream into a std::string, preserving spaces that operator>> would leave behind. It collects characters until the line ends or a delimiter is reached. section 3.1.2
Read a complete response
Use std::getline when a response may contain spaces, such as “Hello, World!”: std::string in; std::getline(std::cin, in); The resulting string contains the complete line. section 3.1.2
