From: "J. Lee" Newsgroups: comp.os.msdos.djgpp Subject: flushing buffers Date: Sat, 23 Nov 1996 23:50:09 -0800 Organization: Carleton University, Ottawa, Canada Lines: 13 Message-ID: <3297FE31.34F5@freenet.carleton.ca> NNTP-Posting-Host: superior.carleton.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit NNTP-Posting-User: jknlee To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp I am using DJGPP 2.01, running Windows 3.1 with 16megs of ram. My problem is as follows. Before i get an input from the keyboard using any of the stdio functions (ex. scanf, getchar(),gets etc.), i always flush out the buffer using fflush(stdin). However, the buffer is never flushed out. On my next getchar() statement, for example, the remaining characters in the buffer are retrieved instead of waiting for new input. The fflush(stdin) work fine when i am using UNIX. How can i solve this very frustrating problem in DJGPP? Thanks in advance.