From owner-freebsd-hackers Wed Dec 18 07:50:52 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id HAA12190 for hackers-outgoing; Wed, 18 Dec 1996 07:50:52 -0800 (PST) Received: from fallout.campusview.indiana.edu (fallout.campusview.indiana.edu [149.159.1.1]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id HAA12183 for ; Wed, 18 Dec 1996 07:50:48 -0800 (PST) Received: from localhost (jfieber@localhost) by fallout.campusview.indiana.edu (8.8.4/8.8.4) with SMTP id KAA06605; Wed, 18 Dec 1996 10:50:29 -0500 (EST) Date: Wed, 18 Dec 1996 10:50:29 -0500 (EST) From: John Fieber To: Chuck Robey cc: Frank Nobis , hackers@FreeBSD.ORG Subject: Re: Weired c++ behaviour regarding iostreams In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk 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