Did you try:
fflush( stdin);
scanf( "...");

or maybe:
gets( buffer);
sscanf( buffer, "...");

There are lots of ways to read from the standard input that are better 
than using scanf.
Also scanf( "..."); is the same as fscanf( stdin, "...");

--
Daniel R. Oldham Ph.D.
Computer Engineer
Satellite Networks and Architectures Branch
NASA Glenn Research Center
21000 Brookpark Road (MS 54-5)
Cleveland OH 44135
216.433.6307 - voice
216.433.8705 - fax
[EMAIL PROTECTED]

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 3/5/02, 12:32:28 PM, Keith Jonathan Bodwell <[EMAIL PROTECTED]> wrote 
regarding Re: stdio.h:


> no, I am trying to use flushall() before a scanf because if i dont have
> the flushall() it will not pause the second time i use the scanf
> flushall() is in the stdio.h file in Microsoft Visual C++ and my program
> works there, but when I try to compile it in linux, it cant find
> flushall().the flushall() is used to clear the variables, fflush is for
> flushing file stream I beleave.


> Aaron Konstam wrote:

> > On Tue, Mar 05, 2002 at 11:34:30AM -0500, Keith Jonathan Bodwell wrote:
> >
> >>Does anyone know why the stdio.h file that comes with gcc does not
> >>include the flushall() function, and is there a way I can get a stdio.h
> >>with the flushall() function that will work with gcc?
> >>    Thanks
> >>            Keith
> >>
> >>--
> >>
> > Is what you want to do is flush all output streamsi? well the man page
> > says that fflush can do that:
> >  If the stream argument is NULL, fflush  flushes  all  open
> >         output streams.
> >



> --
> Keith Jonathan Bodwell
> ------------------------------
> Civil Engineering Student
> ------------------------------
> [EMAIL PROTECTED]
> [EMAIL PROTECTED]
> ------------------------------
> http://www.keithbodwell.com
> ------------------------------
> 303 Notch Hill Rd.
> North Branford, CT 06471
> (203) 481-9925



> _______________________________________________
> Seawolf-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/seawolf-list



_______________________________________________
Seawolf-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/seawolf-list

Reply via email to