Answers for "how to tell if file is end using cin"

0

how to tell if file is end using cin

if (std::cin.peek() != std::char_traits<char>::eof()) {
    // do something with the potentially present input.
}
else {
    // fail
}
Posted by: Guest on February-07-2022

Code answers related to "how to tell if file is end using cin"

Browse Popular Code Answers by Language