Later versions of C++ introduced a “multiple inheritance” model for inheritance. In a multiple inheritance graph, the relationships can be many-to-many between the base and derived classes, instead of one-to-many in single inheritance. Consider the graph in Figure 9.3.
The diagram in Figure 9.3 shows a class, CollectibleString. It is like a Collectible (something that can be contained in a collection), and it is like a String. Multiple inheritance is a good solution to this kind of problem (where a derived class has attributes of more than one base class) because it is easy to form a CollectibleCustomer, CollectibleWindow, and so on.
If the properties of either class are not required for a particular application, either class can be used alone or in combination with other classes. Therefore, given the hierarchy depicted in Figure 9.3 as a basis, you can form noncollectible strings and collectibles that are not strings. This flexibility is not possible using single inheritance.