View Single Post
Old 03-31-2003, 06:51 AM   #1 (permalink)
mangeli
Registered User
 
Join Date: Mar 2003
Posts: 4
mangeli is on a distinguished road
Send a message via AIM to mangeli
Problem Compiling...

Ok, I'm a newbie, so bear with me...
I'm running Mandrake 9.1.

I picked up a copy of Sams Teach yourself C++ in 21 days, and I created my hello.cpp file.

Code:
#include <iostream>

int main()
{
     std::cout << "Hello World!\n";
     return 0;
}
I know, its the most basic thing all programmers learn to do.

However, when I run

Code:
#: gcc -o hello hello.cpp
I get errors and nothing is created.
Quote:
In function `main' :
: undefined reference to `std::cout'
and it goes from there....
mangeli is offline   Reply With Quote