C++ in linux? [Archive] - C Board

PDA

View Full Version : C++ in linux?


thelimpkid
03-24-2008, 03:29 AM
This may sound as an completely stupid question. But I'm really confused.

I want to program in C++ for Linux. I'm using Eclipse now, and I installed the C/C++ Development Tools.

I wanted to compile something really simple:


#include <iostream>
using namespace std;

int main() {
cout << "Hello World!";

return 0;
}


What should I do to get this to work?

Caduceus
03-24-2008, 06:08 AM
I think most Linux distros include the g++ compiler (my Ubuntu has it) already installed. Find a good text editor (I use SCiTE) and compile it with g++

thelimpkid
03-24-2008, 09:39 AM
Ah, it works now.
Thank you!