LinuxSA Mailing list archives
Index:
[thread]
[date]
[subject]
[author]
From: David Newall <davidn@rebel.net.au>
To : Jake Hawkes <jake@eclectic.com.au>
Date: Mon, 10 May 1999 20:43:12 +0930 (CST)
Re: redirecting output to a file (was thi has me stumped)
Thankyou Jake. Names are much friendlier.
> My question therefore has morphed into this:
> "Do I need to have an fflush() after every printf(), regardless of
> whether the printf() has a \n in it or not?"
If you want to be certain that your output has been written, the answer
is yes.
> If so, I think this is un-funky. In my opinion, the coder should not
> have to care what the stdout stream is going. It seems however that a
> coder does, or at best put fflush() calls everywhere.
This would be true if the coder hadn't bothered to read the manual, however
I'm sure you noticed that you can set the file to be line buffered even if
the output is to a file... (Please read up on stdio before you ask how.)
--
Check out the LinuxSA web pages at http://www.linuxsa.org.au/
To unsubscribe from the LinuxSA list:
mail linuxsa-request@linuxsa.org.au with "unsubscribe" as the subject
Index:
[thread]
[date]
[subject]
[author]
Return to the LinuxSA Mailing List Information Page