Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 18 Dec 1996 10:50:29 -0500 (EST)
From:      John Fieber <jfieber@indiana.edu>
To:        Chuck Robey <chuckr@Glue.umd.edu>
Cc:        Frank Nobis <fn@radio-do.de>, hackers@FreeBSD.ORG
Subject:   Re: Weired c++ behaviour regarding iostreams
Message-ID:  <Pine.BSI.3.95.961218104156.280O-100000@fallout.campusview.indiana.edu>
In-Reply-To: <Pine.OSF.3.95.961217220440.21136A-100000@thurston.eng.umd.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 17 Dec 1996, Chuck Robey wrote:

> Trouble is, you try to use both stdio.h (which is C's i/o functions) and
> iostream.h (which is C++'s i/o functions).  Since they both try to do
> buffering of their own, outside of the operating system buffering, this is
> a big no-no.  Choose your poison, either stdio.h (which works fine with
> C++) or iostreams, but not both.

In *theory*, the gnu iostreams are supposed to (by default) work
with C i/o, but with a performance penalty.  I've just been
experimenting a bit and if you only use iostreams, you can set

  ios::sync_with_stdio(0);

for a substantial performance boost.  I just discovered the
iostreams info file last night which documents the library quite
nicely. :)

-john




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.95.961218104156.280O-100000>