From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6958 invoked by alias); 8 Feb 2002 21:41:31 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 6752 invoked from network); 8 Feb 2002 21:41:21 -0000 Received: from unknown (HELO mta11.srv.hcvlny.cv.net) (167.206.5.46) by sources.redhat.com with SMTP; 8 Feb 2002 21:41:21 -0000 Received: from optonline.net (ool-43527964.dyn.optonline.net [67.82.121.100]) by mta2.srv.hcvlny.cv.net (iPlanet Messaging Server 5.0 Patch 2 (built Dec 14 2000)) with ESMTP id <0GR800M1OHKX26@mta2.srv.hcvlny.cv.net> for gcc-help@gcc.gnu.org; Fri, 08 Feb 2002 16:41:21 -0500 (EST) Date: Fri, 08 Feb 2002 13:41:00 -0000 From: Frank Geck Subject: Re: how can cout be undeclared? To: Kirk Cc: gcc-help@gcc.gnu.org Message-id: <3C64453F.14072C67@optonline.net> Organization: Keyway Security MIME-version: 1.0 X-Mailer: Mozilla 4.76 [en] (WinNT; U) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-Accept-Language: en References: <02020813570506.01192@truffula.localdomain> X-SW-Source: 2002-02/txt/msg00094.txt.bz2 Kirk, I think (don't remember for sure) just add in you header or main "using namespace std;". Frank Kirk wrote: > I'm trying to a program ported from linux (redhat7.2 running gcc-2.96RH) to > freebsd. I have installed gcc-3.0. Most of the compile time errors that I was > getting while using gcc-2.95 on freebsd have disappeared now that I'm > compiling with gcc-30. However, there is one that is perplexing me. It is: > > tveg.cpp: In member function `void TVeg::dayOut(TDay*)': > tveg.cpp:428: `cout' undeclared (first use this function) > tveg.cpp:428: (Each undeclared identifier is reported only once for each > function it appears in.).... > > the whole error output is below. > > It is odd that a simple cout (which compiles fine on redhat's 2.96 version) > is choking here. > > Any thoughts? > > Thanks in advance, > > Kirk > > su-2.05a$ make clean > rm *.o *~ > su-2.05a$ make pnet > g++30 -c -ansi -g -Wall tday.cpp > g++30 -c -ansi -g -Wall tveg.cpp > tveg.cpp: In member function `void TVeg::dayOut(TDay*)': > tveg.cpp:428: `cout' undeclared (first use this function) > tveg.cpp:428: (Each undeclared identifier is reported only once for each > function it appears in.) > tveg.cpp: In method `void TVeg::yearOutCN(TDay*)': > tveg.cpp:464: warning: unused variable `double folC' > tveg.cpp:465: warning: unused variable `double totalN' > tveg.cpp:466: warning: unused variable `double totalM' > tveg.cpp: In method `void TVeg::understory(TDay*)': > tveg.cpp:478: warning: unused variable `double mossResp' > tveg.cpp:481: warning: unused variable `double growthResp' > *** Error code 1