| delorie.com/archives/browse.cgi | search |
| From: | Douglas Gleichman <doug AT tcville DOT es DOT hac DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: Ghosts in DJGPP :-) |
| Date: | 29 Jan 1997 10:01:48 -0800 |
| Organization: | Hughes Aircraft Company |
| Lines: | 13 |
| Sender: | doug AT X-147-16-128-32 DOT es DOT hac DOT com |
| Message-ID: | <qmenf4nywj.fsf@X-147-16-128-32.es.hac.com> |
| References: | <Pine DOT GSO DOT 3 DOT 95 DOT 970128014035 DOT 27048B-100000 AT hops DOT cs DOT jhu DOT edu> |
| NNTP-Posting-Host: | x-147-16-128-32.es.hac.com |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Michael Phelps <morphine AT hops DOT cs DOT jhu DOT edu> writes:
> Output in DJGPP is buffered by default. There are a couple quick fixes
> for your code:
> (1) printf("Hi , "); -> printf("Hi, , \n"); /* newline forces write */
> (2) fflush(stdout); /* after printf() */
Or just put
setbuf(stdout, NULL);
at the beginning of main.
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |