How to read cin with whitespace up until a newline character?

std::string str; 
std::getline( std::cin, str);

Leave a Comment