// message-137.cpp //reading strings with embedded whitespace //The call getline(cin, s) reads all chars (including blanks) //from the current char in cin //up to, but excluding, the next newline char, stores those chars in s, //and then discards the newline from cin #include #include using namespace std; int main(){ string first, rest; cout << "Enter a message: "; cin >> first; getline (cin, rest); cout << first << endl << rest << endl; return 0; } /* Sample run: Enter a message: This is a short message. This is a short message. */