From: Michael Sweeney 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 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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)