PDA

View Full Version : C++




Young Jobs
Apr 20, 2006, 02:53 PM
How exactly do i compile a C++ program?



gekko513
Apr 20, 2006, 03:03 PM
It would be easier to help you if you explain a little more about what you're trying to do.

If you want to compile a small, single file, C++ program in a file called test.cpp, you can use the Terminal command g++ like so:

g++ test.cpp -o test

Then you can execute it like so:

./test

steelphantom
Apr 20, 2006, 03:20 PM
You can use CPP Edit (http://www.macupdate.com/info.php/id/18943) to compile simple, one-file C++ programs, but if you are going to be working on big projects, either use Xcode or the Terminal to compile.