From: Pankaj <pankajd@myrealbox.com>
To: stalp@imbei.uni-mainz.de
Cc: linux-c-programming@vger.kernel.org
Subject: Re: feof fails
Date: Wed, 15 Sep 2004 16:43:53 +0530 [thread overview]
Message-ID: <200409151643.53618.pankajd@myrealbox.com> (raw)
In-Reply-To: <B0003441729@hermes.imsd.uni-mainz.de>
hi,
Check whether u have put a \n at the end of last character..
u might have missed it.
Pankaj
On Wednesday 15 Sep 2004 3:09 pm, Christian Stalp wrote:
> Hello together,
> I have a simple problem. I opened a file with fopen and read from the file
> with:
> while ( !feof( infile ) )
> {
> fgets( buffer, BUFFER_SIZE, infile );
> new_number = atoi ( buffer );
> ......
>
> The file is filled withe a stack of numbers, 7 charakters and each is
> terminated by an '\n'.
>
> My problem now is, that the last number is been read twice. What is the
> problem?
>
> Gruss Christian
next prev parent reply other threads:[~2004-09-15 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-09-15 9:39 feof fails Christian Stalp
2004-09-15 11:13 ` Pankaj [this message]
2004-09-15 14:23 ` Charlie Gordon
-- strict thread matches above, loose matches on Subject: below --
2004-09-15 14:57 Huber, George K RDECOM CERDEC STCD SRI
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200409151643.53618.pankajd@myrealbox.com \
--to=pankajd@myrealbox.com \
--cc=linux-c-programming@vger.kernel.org \
--cc=stalp@imbei.uni-mainz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).