|
|
back to boardIf you use cin in C++ Posted by John 12 Jan 2022 22:36 I had a hard time with this, so hopefully I will save your time. Read input like this: int n; cin >> n; string t; getline(cin, t); // Necessary to process end of first line (nothing after n) .... // Now keep getting each line with getline(cin, t) |
|
|