Transcription: Use the EOF member function to check if you have reached the end of a file that is attached to a stream. In this example, source.EOF returns zero if you have not reached the end of a file that is attached to the stream object source. When the end of the file is reached, source.EOF returns a non-zero value and the while loop exits.