I am trying to make my file parsing more robust. Using an ifstream, how can I ensure seekg
keeps me in a valid position within the file?
This does not work:
while(m_File.good() && m_File.peek() != EOF)
{ ...a seekg operation moves file position past end of file... }
I assume the current iterator has been pushed way past the end iterator, so the peek() is never true.