delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/08/02:08:34

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Date: Fri, 8 Mar 2002 09:04:33 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
X-Sender: pavenis AT ieva06
To: Chris Barry <crbarry AT mts DOT net>
Cc: djgpp AT delorie DOT com
Subject: Re: RHIDE and C++ lib
In-Reply-To: <xFTh8.98$5m3.2692@news1.mts.net>
Message-ID: <Pine.A41.4.05.10203080901480.29758-100000@ieva06>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com


On Thu, 7 Mar 2002, Chris Barry wrote:

> Hi. I need a little help with something; I've been using RHIDE and DJGPP for
> over a year, but sometimes (like right now), when I start a new project and
> try to compile a simple source file, RHIDE complains about cout being
> undeclared or somesuch. Here; I'm trying to compile a simple Hello, WOrld
> and I get errors:
> 
> #include <iostream>
> 
> int main()
> {
>    cout << "Hello, World!!";
>    return 0;
> }
> 
> In functions `int main()':
> Hello.cpp(5) Error: `cout' undeclared (first use this function)'
> 
> I'm not sure how to get rid of this. It usually doesn't happen. Any ideas?
> Thanks.
> 

Perhaps You're using gcc-3.0.4 (or some earlier 3.0.X version) ...

cout is now in std namespace. Use std::cout instead or put 
'using namespace std;' somewhere before that

Andris
  



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019