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