check EOF ???

Hi everybody?

Does anybody knows how can I check the EOF in c++? I want to read a file written by other application. So I want to check the EOF flag in order to determine if the other application has finished. I have tried it but eof() returns everytime 0(no matter if the file is opened or not)

Thank you very much

Radeberger
eof() should work but if you are checking if the file is open you should use is_open()
http://www.cplusplus.com/reference/iostream/fstream/is_open/
Topic archived. No new replies allowed.