This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Simple hello world problem
- From: Kris Munch <munch at cs dot umn dot edu>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 13 Mar 2003 15:21:56 -0600
- Subject: Simple hello world problem
New to MacOSX, and just installed the Mac Developer suite so I could
use gcc. However, when creating the simple hello world program, I
cannot get it to compile:
#include <iostream>
#include <stdio.h>
int main()
{
cout << "TESTING.." << endl;
return 0;
}
I get these errors:
myprog.cc: In function `int main()':
myprog.cc:6: `cout' undeclared (first use this function)
myprog.cc:6: (Each undeclared identifier is reported only once for each
function it appears in.)
myprog.cc:6: `endl' undeclared (first use this function)
Like it doesn't know where the includes are, an cannot figure out what
cout is. Can anyone help?
K. Munch