Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

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.
 
PREVIOUS NEXT
Tagged: #read #line #console
ADD COMMENT
Topic
Name
6+3 =