www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/10/20/14:36:16

From: "bitc" <uh AT rt>
Newsgroups: comp.os.msdos.djgpp
Subject: Using getch() in DJGPP
Date: 20 Oct 1996 16:45:02 GMT
Organization: InterAccess, Chicago's best Internet Service Provider
Lines: 22
Message-ID: <01bbbea6$206725e0$454fb7ce@default>
NNTP-Posting-Host: d69.nhe.interaccess.com
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Why doesn't the following function in DJGPP...

int main()
{
	printf("Hello.");
	getch();
}

Now, in every other compiler I've seen, the binary will run like this:

Hello. {keypress}{exit}

But when compiled under DJGPP, I get this:

{keypress}Hello. {exit}

This isn't making sense to me. Why isn't the string printing until I press
a key? Shouldn't the program run in the order I wrote the instructions?

Jake Harvey
jwharvey AT interaccess DOT com

- Raw text -


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