delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/28/16:56:42

From: Michael Sweeney <mike_sweeney AT videotron DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Ghosts in DJGPP :-)
Date: Tue, 28 Jan 1997 12:54:55 -0500
Organization: SPC
Lines: 18
Message-ID: <32EE3D6F.6573@videotron.ca>
References: <32ED747F DOT 70BD AT fi DOT muni DOT cz>
NNTP-Posting-Host: 205.237.232.218
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

xlysak wrote:
> 
> Can someone help me ?
> 
> 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.
> 
> Thanks for all answers !

If I remember right from the FAQ, this is due to the way that DJGPP
handles output, you would have to flush the output stream first , the
printf is basically being executing first, but the getch() is run before
the buffer is full and flushed automatically

I think this is correct, it's been too long since I programmed (shame on
me I know)

- Raw text -


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