ifstream seekg doesnt work?

Started by
1 comment, last by The C modest god 20 years, 3 months ago
I have opened an ifstream file. Read its content until reached eof. then I did: File.fseekg (0, ios::beg) But it is still at end of file. Why does seekg doesnt work?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.
Advertisement
Instead of doing fseekg I have closed the file and opened it again with File.open("a.fl", ios::binary);
I opened it with the same variable I opend it before, and for some kind of reasn the eof flag is still set although the file is clearly not empty.
Any ideas why this happens?
It's all about the wheel.Never blindly trust technoligy.I love my internal organs.Real men don't shower.Quote:Original post by Toolmaker Quote:Original post by The C modest godHow is my improoved signature?It sucks, just like you.
Try calling File.clear() to clear the eof bit.

This topic is closed to new replies.

Advertisement