willis0924 willis0924 - 19 days ago 5
C++ Question

C++ Xcode compile?

Can Xcode 4.0 compile and run very simple C++ programs? I am talking "Hello World" type programs. If so, can someone type out how.

Also, if Xcode doesn't do it, or if someone likes a better utility go ahead, but is there any development tool for c/c#/c++ that lets you basically develop in real time; compiles and executes automatically (as much as possible)

Answer

The compilers which ship with Xcode are perfectly capable of C++. Go to File->New->New Project. Under the Mac OS X section, select Application and then Command Line Tool.

Click next and then call your application "HelloWorld", change the type to C++, tell Xcode where you want to save this new project, and voila there is your Hello World program in C++. And yes, it compiles. :)

Comments