string s; getline(cin,s); while (HOW TO WRITE IT HERE?) ... Using "while (!stream. eof()) {}" is almost certainly wrong. Use the stream's state as ...
stackoverflow.com