![]() |
eof bit not set
why such two easy lines don work
char c; while(!file.eof ()) { file.read(c,1); cout<<c; } the loop is infinite i don know why the eof bit is not set or what |
Re: eof bit not set
You don't show how you're opening the file, so the fail bit is probably set, which means the eof bit will not be set. If you care to show some more code, feel free to do so.
If you show more code, and want a response, put the code in code tags. |
Re: eof bit not set
Code:
string str2="test.txt";Code:
while(file.tellg()<=lastEnd) |
Re: eof bit not set
Are you paying attention, and have you bothered to read the documentation for the functions you use?
|
Re: eof bit not set
i already did, but i don remember any thing telling me the code i sent is wrong.
thanks 4 help |
| All times are GMT +5.5. The time now is 02:41. |