This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: GCC compiler in Red Hat 9
- From: lrtaylor at micron dot com
- To: <hasan dot shibly at saunalahti dot fi>, <gcc-help at gcc dot gnu dot org>
- Date: Mon, 12 Jan 2004 13:05:05 -0700
- Subject: RE: GCC compiler in Red Hat 9
cout is in the "std" namespace. So, you either need to add a "using namespace std;" statement after your include statement, or refer to cout as std::cout.
Cheers,
Lyle
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org]On
Behalf Of Hasan Shibly
Sent: Monday, January 12, 2004 12:57 PM
To: gcc-help@gcc.gnu.org
Subject: GCC compiler in Red Hat 9
Hello,
I have just installed Red Hat 9 (Fresh installation on a dual boot
system with Win XP) on my system.
For some reason g++ compiler is giving me errors, even for the simple
"Hello world" program.
#include <iostream>
int main()
{
cout << "hello world";
return EXIT_SUCCESS;
}
Below is the compilation error I am facing.
$ g++ test.cpp
test.cpp:5: 'cout' undeclared (first use this function)
test.cpp:5: (Each undeclared identifier is reported only once for each
function it appears in.)
Your help is highly appreciated.
Regards
H@z@n