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 X-Sender: pavenis AT ieva06 To: Chris Barry Cc: djgpp AT delorie DOT com Subject: Re: RHIDE and C++ lib In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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 > > 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