Programming in C++

C++ is a general-purpose programming language originally developed by Bjarne Stroustrup in 1979 as an extension to the C programming language, and known as C with Classes. The language was released as C++ in 1985, and is still widely used to create powerful object-oriented applications. Despite its popularity, the language represents a steep learning curve to the novice programmer. In addition to mastering the syntax of the language itself, it is important to appreciate the importance of good software design, to understand the principles behind object-oriented programming, and to become familiar with the C++ library functions.

The current C++ programming language standard is defined by ISO/IEC 14882:2003, although a new version of the standard is being developed. The C++ libraries that have emerged have replaced many of the traditional C functions, although a high level of compatibility with C has been designed into C++ to enable a smooth transition from the older procedural language to newer, object oriented language.

Many of the sample programs provided in the following sections have been compiled and run as console applications using Borland Turbo C++ 2006, which at the time of writing is no longer freely available for download. They should work with other C/C++ compilers, however (I have tried some of these with Microsoft's Visual Studio 2008 without any problems). If you are looking for a good open source C/C++ compiler, I can recommend Code::Blocks, which provides an excellent cross-platform IDE.