Beginners guild to C++

In this tutorial we will do a simple hello world example to make sure that you have every thing set up right. All my c++ examples can be coded with any compiler but I will be using Xcode which is a free development environment for the mac.

First download and install Xcode from  You will have to sign up for their developer program. Pick the free one because you probably wont be developing games for the iPhone or Mac with in the next month.

Ok now we need to open Xcode. Go to file newProject. Under Mac Os X, choose Application, then click on Command Line Tool, and make sure that C++ StdC++ is selected the press Choose…

Choose a save location and then name it hello world.

Now click on main.cpp and you should see the following code.

#include <iostream>

int main (int argc, char * const argv[]) {
    // insert code here…
    std::cout << "Hello, World!\n";
    return 0;

In the menu select Run, and then Console. Then click build and run. If you see something like the following then you have installed everything correctly and can now continue to the next tutorials.

If you run your code

This entry was posted in C++. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>