Wanting to get into c++/openFrameworks, and thought the first to do would be to brush up on my c++. It's been 7 or 8 years since I touched it, so the following is the simplest hello world I could get working.
I'm running this on Ubuntu 10.10 and have g++ installed.
I created HelloWorld.C
with the following code:
#include
using namespace std;
int main ()
{
cout << "Hello World!";
return 0;
}
I'd assume that it could be done more efficiently by having a void main declared, but apparently main must always be declared to return a value which is an int.
Anyway, to compile the above code, run the following:
g++ HelloWorld.C
This create's an a.out file. Just run the following command for Hello World goodness:
./a.out