ABSTRACT

C++ was developed by Bjarne Stroustrup at AT&T Bell Laboratories during the 1980s. A C++ program may use C libraries. C++ is a rather large language, much more complex than C. The most important difference from C is the support of object-oriented features. This chapter introduces C++ and highlights some of the most important object-oriented key concepts, such as encapsulation, polymorphism, and inheritance. The concept of encapsulation refers to the grouping of data and functions and the ability to define their accessibility. In C++, the mechanism that supports encapsulation is called class. The accessibility defines the access to the class data. A class may contain one or more special functions called constructors. Overloading is part of the polymorphism in the sense that it allows programmers to reuse existing function names and operators and give them additional meanings. Inheritance is one of the most important features of an object-oriented programming language.