View Single Post
Old 19th May 2008
Johnny2Bad Johnny2Bad is offline
Port Guard
 
Join Date: May 2008
Posts: 21
Talking Okay it now works...

ephemera had most of the answer, I was using the wrong compiler. I should use g++ not anything else, but then I ran into a problem.

So g++ -o Hello Hello.cpp worked with the following code.

Code:
#include <iostream>

using namespace std;

int main()
{
        cout<<"Hello World\n";

        return 0;
}

The thing wouldn't execute from the current directory so

Code:
Hello
failed, but when I typed...

Code:
./Hello
it finally said "Hello World"!

Thanks for your help guys, in future I will post programming questions where they belong.

Cheers,
Jonathan.
Reply With Quote