[Linux-Discussion] Re: question

  • From: Paul <landerso@xxxxxxxxxx>
  • To: linux-discussion@xxxxxxxxxxxxx
  • Date: Sat, 09 Jun 2001 14:05:16 -0400

Curt Binder wrote:
> 
> while(n > 0)
>
This should be: 
while (n!=EOF)

read() will return an EOF when you try to read past the end of the
file.  The only way to detect an EOF is to attempt reading past the end.
=============================================================
Avenir Web's Linux Discussion List

List info: //www.freelists.org/cgi-bin/webpage?webpage_id=13
To unsubscribe: email linux-discussion-request@xxxxxxxxxxxxx
with 'unsubscribe' in the Subject line.

Administrative contact: weez@xxxxxxxxxxxxx
=============================================================

Other related posts: