www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2001/03/07/14:21:36

Message-ID: <3AA68885.A0B5C50A@earthlink.net>
From: Martin Ambuhl <mambuhl AT earthlink DOT net>
X-Mailer: Mozilla 4.76 [en] (Win95; U)
X-Accept-Language: en,zh-CN,fr,de-CH,ru
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: Re: question
References: <JA8AAAAABrrLhgABYQABlXwdgctU AT magnet DOT mt>
Lines: 31
Date: Wed, 07 Mar 2001 19:11:46 GMT
NNTP-Posting-Host: 209.246.102.2
X-Complaints-To: abuse AT earthlink DOT net
X-Trace: newsread1.prod.itd.earthlink.net 983992306 209.246.102.2 (Wed, 07 Mar 2001 11:11:46 PST)
NNTP-Posting-Date: Wed, 07 Mar 2001 11:11:46 PST
Organization: EarthLink Inc. -- http://www.EarthLink.net
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Penza Kenneth at MITTS wrote:
> 
> Hi,
>         I am experiencing problems when using the fflush function.
> I am compiling the program with both Borland C Compiler and gcc, with both
> compilers no error crops up. However the BCC version works fine, whilst the
> gcc version is ignoring the fflush (stdin).

In C, fflush() is defined only for output streams.  Whatever BCC
is doing is purely its own choice, not defined in the C language
and completely non-portable.  If you examine the defined behavior
of fflush() on output streams, you will see that there is NO obvious
meaning for it to have on an input stream.

> 
> Attached please find the code I am using. Am I doing something wrong ?

No, I don't please find any attachment.  What sort of fools do you think 
hang out here.  Do not post binaries to newsgroups not specifically set
up for that purpose.

> 
> I am using djgpp version 2.03 on Windows 95.
> 
> Thanks
> Kenneth
> 
>   ------------------------------------------------------------------------------
>                  Name: question.c
>    question.c    Type: Plain Text (text/plain)
>              Encoding: quoted-printable

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019