1. Install xcode (version 3.2) software:
1. xcode software can be downloaded from the apple website
2. Select the Mac OS X install DVD in the original accessories package, and install xcode. mpkg
2. Start c ++ in xcode:
Startup path:
Macintosh HD → developer → applications → xcode, start xcode:
The following figure is displayed:
3. Select application on the left, and then command line tool on the right. type can be selected based on the actual situation and click choose to create a project:
Press choose... And enter the file name and storage location.Program:
4. Execute the program
During the initial execution of the Program (build and run), it is generally found that there will be no familiar Black Boxes. In fact, this is related to the default setting of xcode.
How do I change the default value?
Click xcode> preferences… In the toolbar...
For example, in the drop-down list box, the default value is "Do nohing", so the console is not displayed. Change it to showconsole & debugger.
5. If you compile the program again, the console will not flash.