C++ version 2.0 was released by AT&T during the summer of 1989, and the major addition to the language is multiple inheritance, the ability to inherit data and methods from more than one class into a subclass. Multiple inheritance and a few of the other additions to the language will be discussed in this chapter along with some of the expected future directions of the language.
Several companies have C++ compilers available in the marketplace, and many others are sure to follow. Because the example programs in this tutorial are designed to be as generic as possible, most should be compilable with any good quality C++ compiler provided it follows the AT&T definition of version 2.1 or newer. Many of these examples will not work with earlier definitions because the language was significantly changed with the version 2.1 update.
Multiple Inheritance in C++
C++ Language’s most powerful feature is multiple inheritance which makes it more powerful than Java.
It is possible for one class to inherit the attributes of two or more classes.
The general form is
class DerivedClass : BaseClassList //seperated with commas
Here is a simple example.
class Z : public X, public Y
Here Z class has the access to both the members of X & Y class.