how to get a string input with space in cpp code example Example: how to make string get spaces c++ string s; getline(cin,s);