On Thu, Oct 9, 2008 at 1:54 PM, Jos Timanta Tarigan
<[EMAIL PROTECTED]> wrote:
> Hi,
> Im currently try to read a binary file. Im using this loop
>
> while(!f.eof() {do.something()}
>
> to do the loop. I notice that this method is nor recommended since there will
> be an
> additional loop at the end. How can I loop a binary file without using this
> loop? What
> is the other way to do it?
You test the read operation (currently in your do.something() bit)
for failure, then use feof() to determine if end of file caused the
fatal read.
--
PJH
http://shabbleland.myminicity.com/ind