From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16564 invoked by alias); 7 Jan 2005 13:50:32 -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 16492 invoked from network); 7 Jan 2005 13:50:22 -0000 Received: from unknown (HELO npri54mai02.npt.nuwc.navy.mil) (164.223.1.101) by sourceware.org with SMTP; 7 Jan 2005 13:50:22 -0000 Received: from npri54exc24.npt.nuwc.navy.mil (NPRI54EXC24.NPT.NUWC.NAVY.MIL [129.190.70.87]) by npri54mai02.npt.nuwc.navy.mil (PMDF V6.2-X17 #30632) with ESMTP id for gcc-help@gcc.gnu.org; Fri, 07 Jan 2005 08:50:18 -0500 (Eastern Standard Time) Received: from NPRI54EXC24.NPT.NUWC.NAVY.MIL ([129.190.70.87]) by npri54exc24.npt.nuwc.navy.mil with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id CN4CFSWH; Fri, 07 Jan 2005 08:50:17 -0500 Received: from 129.190.170.200 by npri54exc24.npt.nuwc.navy.mil (InterScan E-Mail VirusWall NT); Fri, 07 Jan 2005 08:50:16 -0500 Date: Fri, 07 Jan 2005 13:50:00 -0000 From: Christian Convey Subject: Re: iostream not visible in g++ In-reply-to: <20050107111733.38991.qmail@web50310.mail.yahoo.com> To: gcc-help@gcc.gnu.org Message-id: <41DE9352.3020800@npt.nuwc.navy.mil> MIME-version: 1.0 Content-type: text/plain; format=flowed; charset=ISO-8859-1 Content-transfer-encoding: 7bit User-Agent: Mozilla Thunderbird 0.9 (X11/20041124) References: <20050107111733.38991.qmail@web50310.mail.yahoo.com> X-SW-Source: 2005-01/txt/msg00033.txt.bz2 Hi, IIRC, some release of GCC moved objects like "cout" from the global namespace to the std:: namespace. So for code that use to look like this: #include void foo() { cout << "Hello, World!" << endl;} I now have the code look like this (by adding the 2nd line): #include using namespace std; void foo() { cout << "Hello, World!" << endl;} Alternatively, if I didn't want to use the statement "using namespace std;", I could instead write code as follows (by adding the "std::" prefix where necessary): #include void foo() { std::cout << "Hello, World!" << std::endl;} Hope this helps, Christian deepak prabhas soi wrote: > Hi, > I am running the gcc 3.4.2 . The .c files are > compiling properly but when using g++ for compilation > of c++ files,I can't compile even a single line file. > Infact it gives problem in the inclusion of iostream.h > file. what can be error. How can i make these standard > libraries visible to program.I am getting the error as > > > iostream: No such file or directory > /hm/tmp.cpp: In function `int main()': > /hm/tmp.cpp:17: error: `cout' undeclared (first use > this function) > /hm/tmp.cpp:17: error: (Each undeclared identifier is > reported only once for each function it appears in.) > /hm/tmp.cpp:17: error: `endl' undeclared (first use > this function) > > > Can anybody please help me, how can i make these > standard libraries to be visible. I need it urgently. > > regards > Prabhas > > ===== > If facts don't fit theory, change the facts > -Albert Einstein > > > > __________________________________ > Do you Yahoo!? > The all-new My Yahoo! - Get yours free! > http://my.yahoo.com > > -- Christian Convey Computer Scientist, Naval Undersea Warfare Center Newport, RI