From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26346 invoked by alias); 17 Oct 2002 00:57:07 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 26320 invoked from network); 17 Oct 2002 00:57:06 -0000 Received: from unknown (HELO disaster.jaj.com) (66.93.21.106) by sources.redhat.com with SMTP; 17 Oct 2002 00:57:06 -0000 Received: (from phil@localhost) by disaster.jaj.com (8.11.4/8.11.4) id g9H0v1x24993; Wed, 16 Oct 2002 19:57:01 -0500 Date: Thu, 17 Oct 2002 06:51:00 -0000 From: Phil Edwards To: Robert Schweikert Cc: Gabriel Dos Reis , gcc Subject: Re: iostream question Message-ID: <20021016205701.A24981@disaster.jaj.com> References: <3DABDBD1.80708@cox.net> <3DAE09E5.2040002@cox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3DAE09E5.2040002@cox.net>; from rjschwei@cox.net on Wed, Oct 16, 2002 at 08:52:53PM -0400 X-SW-Source: 2002-10/txt/msg01035.txt.bz2 On Wed, Oct 16, 2002 at 08:52:53PM -0400, Robert Schweikert wrote: > OK, > > Are you saying I can no longer forward declare an ostream? Yes, but you don't want to forward declare an ostream anymore. class ostream; isn't legal, because it doesn't match the real ostream. > That would mean that for a declaration like so > > ostream& operator<< (ostream&, const myClass); > > I have to include the iostream header file in my header file. That seems > odd. There's got to be a better way. There is, called . All the I/O classes, forward declared. Phil -- I would therefore like to posit that computing's central challenge, viz. "How not to make a mess of it," has /not/ been met. - Edsger Dijkstra, 1930-2002