title: Turbo C++ : while(fin) vs while(!fin.eof())
body: <p>I was told that I should be using <code>while(fin)</code> instead of <code>while(!fin.eof())</code> when reading a file.</p>
  
  <p>What exactly is the difference?</p>
  
  <p><strong>Edit:</strong> I do know that <code>while(fin)</code> actually checks the stream object and that when it becomes NULL, the loop breaks and it covers eof and fail flags.
  But my course teacher says that <code>fin.eof()</code> is better so I need to understand the fundamental operation that's going on here.</p>
  
  <p>Which one is the right practice?</p>
  
  <p><strong>Note:</strong> This is not a duplicate, I need assistance in Turbo C++ and with binary files.
  I'm basically trying to read a file using a class object.</p>