how to get strings with space c++ code example
Example 1: how to make string get spaces c++
string s;
getline(cin,s);
Example 2: read string with spaces in c++
#include <string>
string s;
getline(cin, s);
string s;
getline(cin,s);
#include <string>
string s;
getline(cin, s);