Building Classes in C++   «Prev  Next»
Lesson 3 C++ Requirements
Objective Discover what you need to take this course.

Requirements for the Course on Building C++ Classes

Software - C++ Compiler

In order to do the exercises and course project, you need a C++ compiler. If you do not have a C++ compiler, you can acquire a community edition from Microsoft.

Course downloads

Any source code you need for exercises and for the course project, as well as suggested solutions, are included as formatted code on the web page, which can be copied and pasted into your compiler.
The HTML format will enable you to paste the code into the following operating systems: Windows, Macintosh, and Unix compressed formats.

Compiler

You will need access to a C++ compiler with support for C++11. The website example code was originally built using gcc and works out of the box on Linux and Mac OS. See Global Setup for information about building the example code on Windows. All examples use the STL, an essential part of modern C++ development for many platforms.

1.3 C++ Compiler

Ubuntu

I originally built the examples in this website on Ubuntu 12.10 using g++ 4.7.2.
Install g++ using the following command:

sudo apt-get install build-essential

OS X

I successfully built the examples in this website on Mac OS X 10.8.3 (Mountain Lion) using a gcc port. The version of gcc shipped with Xcode at the time of this writing, 4.2, will not successfully compile the C++ examples in this website. To install the gcc port, you may need to install MacPorts, an infrastructure that allows you to install free software onto your Mac.
Refer to MacPorts for further information.
You will want to first update MacPorts.

sudo port selfupdate

Install the gcc port using the following command:
sudo port install gcc47

This command may take a considerable amount of time to execute. (If you prefer, you can specify the +universal variant at the end of the port command, which will enable compiling binaries for both PowerPC and Intel architectures.) Once you have successfully installed the gcc port, indicate that its installation should be the default.
sudo port select gcc mp-gcc47

You may want to add the command to the path name list.
hash gcc

Additional resources

To see a list of all the courses available on this site visit the Sitemap.