C++: Check istream has non-space, non-tab, non-newline characters left without extracting chars
- by KRao
I am reading a std::istream and I need to verify without extracting characters that:
1) The stream is not "empty", i.e. that trying to read a char will not result in an fail state (solved by using peek() member function and checking fail state, then setting back to original state)
2) That among the characters left there is at least one which is…