Date: Fri, 20 Oct 2000 23:42:21 +0100 (MET) From: Gisle Vanem To: djgpp AT delorie DOT com Subject: Re: printf In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Fri, 20 Oct 2000, Ed Collins wrote: > Hello, there > > When executing a C program in rhide under Windows98, I cannot get the printf > function to work. Nothing is printed to the User Screen. Am I doing > something wrong? Here is a sample of the code. > > tablestruc[0].symbol = "APPLE"; > tablestruc[0].symbval = 0X123; > tablestruc[0].symbinfo = 17; > > printf("%s, %x, %d", > tablestruc[0].symbol,tablestruc[0].symbval,tablestruc[0].symbinfo); > > > I would certainly appreciate anyone's comments. djgpp's printf uses a line-buffered mechanism for better performance. I.e. nothing is actually printed until a newline ('\n') is encountered in the output stream. Use "fprintf (stderr,.." or call "fflush(stdout)" to force a immediate flush of the stream. Gisle V.