From: "Wavemaker" Newsgroups: alt.comp.lang.learn.c-c++,comp.os.msdos.djgpp,comp.programming References: <8scg36$gsm$1 AT nnrp1 DOT deja DOT com> <39E9CF07 DOT 785C0C0F AT eton DOT powernet DOT co DOT uk> <8scls9$kth$1 AT nnrp1 DOT deja DOT com> <39E9FAD5 DOT DE1FDAE4 AT eton DOT powernet DOT co DOT uk> <8sdrub$h7u$1 AT nnrp1 DOT deja DOT com> <39EAA40B DOT 31B0CA89 AT eton DOT powernet DOT co DOT uk> <8seoli$65v$1 AT nnrp1 DOT deja DOT com> Subject: Re: Undertaking a programming journey Lines: 17 X-Priority: 3 X-MSMail-Priority: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: <3uJG5.4922$gX34.96534735@news.randori.com> Organization: Randori News Inc. -- http://www.randori.com -- Reliable! Date: Mon, 16 Oct 2000 15:18:53 -0500 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "ChuckEasttom" wrote: > Richard Heathfield wrote: > > > Schildt is probably the primary reason that so many C programmers > > think fflush(stdin) is a "neat trick". > > Whether you or even I like it, that piece of code is a part of the C > language. No, it's not. Using fflush() on the input stream envokes undefined behavior. See "The C Programming Language" by Brian W. Kernighan and Dennis M. Ritchie: Appendix B, section B1.1, page 242.