simple gcc error
Posted on 2003-03-25
Just installed Red Hat 8.0. This may be the problem since I'm a Solaris guy. I'm not a C++ programmer either, but I wanted to try a little code on Red Hat.
GCC will not compile a simple C++ program and gives me a compilation error after the command:
#gcc foo.cpp -o foo
My program is simply:
using namespace std;
cout << "Foo!";
And when running gcc with the parameters above, I get "undefined regerence to 'std:cout' and 'std:basic_ostream....'
When removing "using namespace std" I get " 'cout' undeclared" as if it does not exist
Anyone see a problem with what I'm doing? Don't be afraid to tell me the obvious!