About C++ Programming Using Xcode on a Mac/Apple Platform

 

 

See the following two video for example:

 

·       How to install Xcode on a Mac OS X: https://www.youtube.com/watch?v=g-Lsk7ypjDI

 

·       Use Xcode to Program C++: https://www.youtube.com/watch?v=FzuDUnoNQo0

 

 

 

Earlier notes from Kyle Yount, CSCI 105 TA, 2011:

 

 

Xcode code is pretty simple to get a project up and running. Here is what you need to do for each project you start.

 

1. If the welcome screen pops up, select "Create a new Xcode project" from the list on the left. Otherwise, press "cmd + shift + N" to make a new project.

 

2. Once a new window pops up, select "Application" on the left-most list, then select "Command Line Tool" from the shown icons on the right and hit next.

 

3. Create a name for your file, I suggest using the assignment name for easy organization. Select "C++" from the type menu and go to the next step.

 

4. Select a location on your Mac to save the project. This will create a project folder where you can find all your files for this class, so remember where you saved it.

 

5. Once another window comes up, you should see a "main.cpp" file in the list on the left. That will be the main file you will code to in this class. By default, Xcode adds a few things to the main function that are kind of unnecessary, so I just delete them all to make the main function look like this:

 

int main ()

{

 

}

 

After you do all this, you should be good to go!