From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: Flush stdin? Organization: Pin Eight Software Message-ID: <6aQXOLicop8Z9i1ZFEJKUWcnFPao@4ax.com> References: <7v82k1$opj$1 AT nnrp1 DOT deja DOT com> X-Newsreader: Forte Agent 1.6/32.525 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 34 X-Trace: /bJ8XX+ElvfvI6757zQ4pF+VHrhxkgc6LuFOLLU3HEOEM18oTYY4+d0lBECniDJvJPkpTlLrHskM!KLWZ5kuK3jIKV0dqpq6epcmrg4rhHA8i9Ku30uEF+3eT5vnfrnA8PinuBQLmKR4h9g== X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Thu, 28 Oct 1999 01:27:05 GMT Distribution: world Date: Thu, 28 Oct 1999 01:27:05 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On Wed, 27 Oct 1999 23:41:53 GMT, cybpunk AT geocities DOT com wrote: > I'm just now progamming 'C' in DJGPP (previously c++) and > I need to know how to get around a problem. In my 'C' class Classes are C++. Structs are C. Oh, that kind of class. :-) > we use MS VC which will clear the input buffer with fflush(stdin), > but djgpp (I believe due to the os) won't. 2 things I need to know. > Is there a alternative function to do this, provided with djgpp, #include getch() is not buffered but rather straight from the BIOS. > or should I write my own. If > I write my own, any ideas? The second thing I need to do is have a > #ifdef statement that will detect the djgpp compiler so I can define > flush according to the compiler building the source. #ifdef __DJGPP__ You say you're using MS Visual C++? Want programs that use a Windows-like GUI but look identical on DOS and Windows? Use Allegro's GUI tools for menus and dialogs. Allegro works not only with DJGPP but also with MSVC. -- Damian Yerrick Mail me from the link on my web site: Pinocchio's Brother