Re: scanf behaviour
- From: Ian Collins <ian-news@xxxxxxxxxxx>
- Date: Sat, 25 Nov 2006 12:04:43 +1300
Richard Heathfield wrote:
Ian Collins said:Oops, so it is.
Add
fflush( stdin );
No, don't do that. The behaviour of fflush on streams open for input is
undefined.
I've always used the Solaris man page definition:
"If stream points to an input stream or an update stream into
which the most recent operation was input, that stream is
flushed if it is seekable and is not already at end-of-file."
--
Ian Collins.
.
- Follow-Ups:
- Re: scanf behaviour
- From: stasgold
- Re: scanf behaviour
- References:
- scanf behaviour
- From: stasgold
- Re: scanf behaviour
- From: Ian Collins
- Re: scanf behaviour
- From: Richard Heathfield
- scanf behaviour
- Prev by Date: Re: screen clearing in ANSI C
- Next by Date: Re: screen clearing in ANSI C
- Previous by thread: Re: scanf behaviour
- Next by thread: Re: scanf behaviour
- Index(es):
Relevant Pages
|
|