📅  最后修改于: 2022-03-11 14:44:53.704000             🧑  作者: Mango
while (cin.peek() != EOF) {
// To do your stuff...
// NOTE: peek() will set failbit when peeking end of stream and return EOF(-1).
}