At 07:03 2007-02-08, Lars Finsen wrote:
>In Borland's C++ I have problems getting eof() to work on a text file
>opened as "ifstream(filename) ui", while the call that fails to find
>EOF is "ui.eof()". Currently I am testing for some unique content of
>the last line instead, but am unhappy with this. Any other
>suggestions? I haven't found any bugs in Borland's C++ so far, and I
>suspect the problem is due to my incomplete knowledge. I am just
>beginning to learn C++ I/O.

you claim that  eof() isn't working, but don't show how you're using it.

IF you're doing something like:

while (!ui.eof())
{
    /* do stuff */
}
it's not going to do what you want
.eof() isn't true until you've failed to read something because of end of file.

>LEF
>
>
>To unsubscribe, send a blank message to 
><mailto:[EMAIL PROTECTED]>.
>Yahoo! Groups Links
>
>
>

Victor A. Wagner Jr.      http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law" 

Reply via email to