Sc3ric

Input text

May 8th, 2023
657
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.20 KB | None | 0 0
  1. cout << "Enter text to add to the end (Enter + Ctrl+Z + Enter to stop adding): " << endl;
  2. string s;
  3. cin.ignore();
  4. getline(cin, s, static_cast<char>(EOF));
  5. cin.clear();
  6. s = s.substr(0, s.length() - 1);
Advertisement
Add Comment
Please, Sign In to add comment