delorie.com/archives/browse.cgi | search |
From: | tgamblin AT telusplanet DOT net (tg) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | printf/getch problem |
Date: | Mon, 26 Jan 1998 06:43:22 GMT |
Organization: | TELUS Communications Inc. |
Lines: | 13 |
Message-ID: | <34cc2c99.1842074@news.telusplanet.net> |
Reply-To: | tgamblin AT telusplanet DOT net |
NNTP-Posting-Host: | mkrvpx01-port-9.agt.net |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Whenever I have a printf before a getch, it waits until a key is pressed before printing the string. However, if the string ends with a \n it works fine. e.g printf("blah"); getch(); will wait for a key to be pressed and then print "blah". If I replace it with "blah\n" it works. Is this supposed to happen and if so how do I get around it? I've tried the same thing with a borland compiler and it works as expected.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |