2006/01/04

[Mac] C++ Programming

Do C++ Programming in a Mac machine

Here is a simple code (Hello World): Save file as test.cpp

#include <iostream>
using namespace std;
int main()
{
cout << "Hello World!\n\n";
return 0;
}


Compile:
(make output file named test.out)
g++ test.cpp -o test.out

Excute output:
./test.out

沒有留言:

張貼留言