read a whole line from the input code example Example: read a whole line from the input string s;//possibly containing spaces getline(cin, s);