 |
c++ - checking for eof in string::getline - Stack Overflow
2010年2月12日 - while (getline(cin, str)) { } if (cin.bad()) { // IO error } else if (!cin.eof()) { // format error (not possible with getline but possible with operator>>) ...
stackoverflow.com |
 |