Introduction

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:2014, although new versions of the standard are currently in development. 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 pages were originally compiled and run as console applications using Borland Turbo C++ 2006, which is sadly no longer available for download. We have subsequently recompiled the code using Dev-C++ - a free, full-featured integrated development environment (IDE) originally developed by distributed under the GNU General Public License for writing programs in both C and C++. You can download the latest version here.

The code should also work with other C/C++ compilers with little or no revision - we have tried many of the sample programs with Microsoft's Visual Studio 2008 and Code::Blocks without encountering any problems.