setting value of EOF

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmot
    New Member
    • Feb 2007
    • 8

    setting value of EOF

    Is there anyway of changing the value of the EOF marker?
  • Ganon11
    Recognized Expert Specialist
    • Oct 2006
    • 3651

    #2
    Technically, yes. I presume you mean the .eof() function in ifstream. .eof() will only return true if the ifstream object is at the end of the file - so reading a file will eventually change .eof() from false to true. Once you reach the end of the file, you can reset the ifstream object by using .close() and then repeating the .open function call with the same target file.

    Comment

    Working...