Simple hello world problem

Kris Munch
Thu Mar 13 21:26:00 GMT 2003

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: In function `int main()': `cout' undeclared (first use this function) (Each undeclared identifier is reported only once for each
    function it appears in.) `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

More information about the Gcc-help mailing list