From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: printf() and shl Questions Date: Wed, 02 Jul 1997 20:25:14 -0700 Organization: Alcyone Systems Lines: 26 Message-ID: <33BB1B9A.47DBC6CE@alcyone.com> References: <19970630090816 DOT 13952 DOT rocketmail AT send2 DOT rocketmail DOT com> NNTP-Posting-Host: newton.alcyone.com 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 Precedence: bulk Jeffery Guan wrote: > You could always use setvbuf to flush out the stdout. > eg.... > > void main(void) > { > setvbuf(stdout, NULL, _IONBF, 0); > printf("Hello world"); > getch(); > } Without having to change the buffering mode for printf, you can just use fflush when you need to: printf("Hello world"); fflush(stdout); getch(); -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "Covenants without the sword / are but words." / Camden