www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/27/23:13:20

From: Ian D Romanick <idr AT cs DOT pdx DOT edu>
Message-Id: <199701280403.UAA10212@sirius.cs.pdx.edu>
Subject: Re: Ghosts in DJGPP :-)
To: xlysak AT fi DOT muni DOT cz (xlysak)
Date: Mon, 27 Jan 1997 20:03:10 -0800 (PST)
Cc: djgpp AT delorie DOT com
In-Reply-To: <32ED747F.70BD@fi.muni.cz> from "xlysak" at Jan 28, 97 03:37:35 am
MIME-Version: 1.0

> In my program are two function - first is printf() and second is
> getch(), 
> but - first is called getch() and then printf(). Ghosts in the GCC :-)? 
> All examples showed bellow running correctly in Borland C++ 3.1.

The reason is that printf() is buffered and cprintf() is not.  Try
putting a call to "fflush(stdout)" after the printf() and see what
happens.  This is the behaviour of most Unix like compilers.
-- 
The words I live by:
  "That which does not kill us makes us stronger."
  "There is no knowledge that is not power."         Knowledge and power at:
  "Without struggle, there is no progress."          http://www.cs.pdx.edu/~idr

- Raw text -


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