Couldn't compile the simple "Hello World"

So, this is my first C++ program under linux. My OS is Red Hat 8.0, and my codes are like following:

$vi hello.cpp

#include <iostream>
using namespace std;

int main()
{
cout << "Hello World!" << endl;
return 0;
}

$ g++ -o hello hello.cpp

the error message are:
hello.cpp: In function `int main()':
hello.cpp:4: `cout' undeclared (first use this function)
hello.cpp:4: (Each undeclared identifier is reported only once for each
function it appears in.)
hello.cpp:4: `endl' undeclared (first use this function)

It could run under M$ with VS 6.0. Can someone tell me what I did wrong here? Thanx.

Some ideas:

Instead of:
#include <iostream>

try either:
using namespace std;
or
#include <iostream.h> (deprecated)

Also, instead of cout << ... you can try std::cout << ...

Please don't double post. I deleted the second copy of this thread.

I tried your program with g++ on SunOS and it works for me. I'm not sure what to tell you. You might look at your compiler's docs and ensure that ansi features are enabled.

oombera 's idea was right. I changed <iostream> to <iosteam.h>, and it worked. Maybe it because the the default compile environment is C but not C++? Well, if I want to change to C++ as the default compile language, what should I do?

Perderabo: Sorry, I first posted it to the wrong place, after I copied and pasted, I forgot to delete the old one. Sorry about that.

Well, Thanks for everyone!