John Gorman wrote: > See me addition below to get the effect you want. > > int main () > > { > > printf ("Scanf Test\n"); > > printf ("enter a character >"); > > scanf ("%c", &c); > > fflush(stdin); The behaviour of fflush() is undefined on input streams. If you want to drain the input buffer, you have to read until there is no more data available (i.e. using non-blocking I/O, select() or the FIONREAD ioctl()). -- Glynn Clements <[EMAIL PROTECTED]>
- Weird keyboard i/o James
- Re: Weird keyboard i/o Henrik Nordstrom
- Re: Weird keyboard i/o John Gorman
- Re: Weird keyboard i/o Glynn Clements
- Re: Weird keyboard i/o James
- Re: Weird keyboard i/o Joseph Martin
- Re: Weird keyboard i/o MCENANEY WILLIAM J
- Re: Weird keyboard i/o Glynn Clements
- Re: Weird keyboard i/o MCENANEY WILLIAM J
- Re: Weird keyboard i/o Glynn Clements
- Re: Weird keyboard i/o Mojahedul-Hoque Abul-Hasanat
- Re: Weird keyboard i/o Mojahedul-Hoque Abul-Hasanat
- Re: Weird keyboard i/o Mojahedul-Hoque Abul-Hasanat
- Re: Weird keyboard i/o Mojahedul-Hoque Abul-Hasanat