Answers for "c++ how to read line from user"

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 "c++ how to read line from user"

Browse Popular Code Answers by Language