hello this is Robert and in this video I
would like to show you how to get
started with an Xcode project. xcode is
only available for the Macintosh and you
can download it from the App Store. I'm
going to click on create a new Xcode
project and then I'm going to make sure
that OS X is selected, and then
application and then command line tool.
from there after I click Next I can give
my project a product name so for example
if this was assignment 1 I could call it
assignment 1 and then the organization
name can be anything you would like i'm
just going to use my initials you can
use your initials if you like same with
the organization identifier RJM that's
my initials and I apologize for the way
that this window is aligned there's
something wrong with my xcode
installation. Then we would like to
select language and make sure that C++
is selected and then I'm going to click
next and then it will show me where I
can store or save my project. I have
previously set up inside of my documents
folder a folder called Xcode projects so
you can do the same or you can place
your project anywhere you would like and
then I'm going to go ahead and click
create. Xcode has created my project for
me, and Xcode does a little bit more
for you than visual studio does when you
create an empty project. You can see
right here that I have a main.cpp
code file all ready to go and some of
the code has already been filled in for
me. To make this look just like the
visual studio program we created in the
other video, I can make a few
modifications here all of this
information inside of the parentheses is
unnecessary, you can leave it they
here or you can delete it if you would
like and then we need the using
namespace standard... statement and then
now that we have this statement here we
can go ahead and get rid of the std and
the two colons or you can leave them
there if you like but now that I've
deleted it it looks just like our
previous project in visual studio and
then the only other difference is that
instead of a \n, i'm going to put the
insertion marks and endl and that
stands for end line. since we're using
xcode there's no need for a system("pause")
statement so this project is complete. in
order to build it and run it I could do
that in two separate steps if I wanted
to so I could select the product menu
and then build and now it's building the
executive program for me, and it look like
it succeeded and then if I want to run
it I can select product and then run.
Unlike visual studio which places the
output of the program in a separate
command prompt window xcode displays the
output of your program in an internal
window so we get to see the output of
the program right down here in this
right hand lower right-hand window. okay
that's about it for creating a project
in xcode. if you would like to see where
the main.cpp file is located you can
right click on it and then select show
in finder. After that the Finder window
will open up and it will display where
your main.cpp file is and if this
was part of your assignment homework you
could upload that to D2l. In order to
find out where we are you can
right-click on the folder at
top of the window and that will tell you
the file path or if you don't have a
right mouse button you can hold down the
control key and then left click. So
that's how you can find out where your
source code file is. okay thanks
