C++ was initially designed as an extension of C and adds object oriented and meta programming features. Like C it is a statically typed imperative language, but in addition it provides many high level features such as exceptions and libraries.

C++ is generally compiled and compilers exist for many platforms, however due to the complexity of the C++ standard, compilers don't always behave the same way.

Example Code

Here is an example of the 100 doors problem:

#include <iostream>
#include <vector>

void doors (int n)
	// Initialize a vector of n boolean values
	std::vector<bool> is_open(n);

	// Process the doors
	for (int pass = 0; pass < n; ++pass)
		for (int door = pass; door < n; door += pass+1)

	// Print out the results
	for (int door = 0; door < n; ++door)
		std::cout << "Door #" << door+1 << (is_open[door] ? " is open." : " is closed.") << std::endl;

int main(int argc, char ** argv)
	// Call the doors function with n = 100
	return 0;

Why would I learn this language?

C++ is in some ways a super-set of C. It was originally called "C with Objects". It adds many advanced language features such as classes, namespaces, exceptions and meta-programming.

C++ has many of the same issues as C, but it also adds many new issues (complex syntax and semantic behavior). On the whole, however, it is a useful language which is used in many different industries.

C++ provides a useful level of abstraction and performance, and is used in both application development. The majority of computer games are written using C++.

Starting Points

C++ Language Tutorial
A beginner guide to programming in C++.
C++ In Action
An online book covering many C++ features from a beginner to intermediate perspective.
An Introduction to GCC
A manual that provides an introduction to the GNU C and C++ compilers.

Further Reading