Answers for "how to read a line from the console in c++"

C++
1

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.
Posted by: Guest on November-06-2020

Code answers related to "how to read a line from the console in c++"

Browse Popular Code Answers by Language