How to determine whether it is EOF when using getline() in c++?

How to determine whether it is EOF when using getline() in c++?

瀏覽:1478
日期:2025-06-30
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 ......看更多