Control ofstream buffering?



 DEVELOP > c-Plus-Plus > Control ofstream buffering?

LINK TO THIS PAGE  


rating :  0   |  0


  Page 1 of 1
Topic: DEVELOP > c-Plus-Plus
User: ""
Date: 15 Dec 2004 12:42:39 AM
Object: Control ofstream buffering?
Hi,
I have an app that generates a text log at a very high rate. Currently
I use an ofstream object to write the log. I would like to control when
'exactly' the log is written to the disk. Also I want to be able to
reset the buffer contents without writing them to the disk file.
- Can the 'buffer size' of an ofstream object (in fact, any iostream
lib object) be controlled?
- Can we control *when* the buffer is flushed? [I want ofstream to
flush *only* when I invoke flush(). The default 'nounitbuf' behavior
doesn't do what I want]
- Is there a way to *reset* the ofstream buffer?
Thanks,
Ishan.
.

 

NEWER

pg.1232     pg.940     pg.716     pg.544     pg.412     pg.311     pg.234     pg.175     pg.130     pg.96     pg.70     pg.50     pg.35     pg.24     pg.16     pg.10     pg.6     pg.3     pg.1

OLDER