www.delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-bounces using -f |
From: | Jason Mills <jmills AT cs DOT mun DOT ca> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: fstream and fflush |
Date: | Thu, 21 Oct 2004 18:06:19 -0230 |
Organization: | Memorial University of Newfoundland |
Lines: | 14 |
Message-ID: | <cl96k3$45r$1@coranto.ucs.mun.ca> |
References: | <cl92jr$3ro$1 AT coranto DOT ucs DOT mun DOT ca> |
NNTP-Posting-Host: | jmills.ccore.mun.ca |
Mime-Version: | 1.0 |
X-Trace: | coranto.ucs.mun.ca 1098390979 4283 134.153.38.195 (21 Oct 2004 20:36:19 GMT) |
X-Complaints-To: | usenet AT coranto DOT ucs DOT mun DOT ca |
NNTP-Posting-Date: | Thu, 21 Oct 2004 20:36:19 +0000 (UTC) |
User-Agent: | Mozilla Thunderbird 0.7.3 (Windows/20040803) |
X-Accept-Language: | en-us, en |
In-Reply-To: | <cl92jr$3ro$1@coranto.ucs.mun.ca> |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
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 |
Jason Mills wrote: > After a few hours or debugging, I reached the conclusion > that to flush a C++ fstream, you must either fstream::close(), > or call fflush(NULL). Is this normal? Or is it a bug? > Actually, the above is not correct. Sorry. After more tests, I discovered that fstream::flush() and fflush(NULL) both will not flush the stream if I am writing rapidly to the stream. If I sleep(), (maybe if I a do other work, I have not checked) the stream is eventually flushed. Can someone explain? Jason
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |