delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/28/23:25:57

From: cybpunk AT geocities DOT com (John G)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Flush stdin?
Date: Thu, 28 Oct 1999 09:54:08 GMT
Lines: 40
Message-ID: <381a1be8.20835023@news.ma.ultranet.com>
References: <7v82k1$opj$1 AT nnrp1 DOT deja DOT com> <6aQXOLicop8Z9i1ZFEJKUWcnFPao AT 4ax DOT com>
Mime-Version: 1.0
X-Trace: wgG1mtyIQG24tsmRJLq9LmTgFLL6ze2iKgPingbm+Vw=
X-Complaints-To: abuse AT rcn DOT com
NNTP-Posting-Date: 29 Oct 1999 02:00:34 GMT
X-Newsreader: Forte Agent 1.5/32.451
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

On Thu, 28 Oct 1999 01:27:05 GMT, Damian Yerrick
<DELCAPSyerricde AT pineight DOT 8mSOFTWARE DOT com> wrote:

>Classes are C++. Structs are C.
>
>Oh, that kind of class. :-)

*chuckle*
Actually structs are C++ too.

>#include <conio.h>
>getch() is not buffered but rather straight from the BIOS.

Actually I tryed that with a while(kbhit()) getch(); then I realized
my mistake.  getch() isn't buffered so it isn't clearing the input
buffer.  I need to clear the input buffer for use with scanf()

>> 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__
Thanks.

>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.
I actually have Allegro.  I used it to create my simple pong game and
will use winallegro once I get it working, for my advance pong game.
I know, I know, just what the world needs, another pong game:-)

Thanks for your help
-John
--
"Hallo. My name is Inigo Mantoya."
"You killed my father."
"Prepare to die."
-Princess Bride

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019