|
I think this may be a problem of understanding: generally we say multiple inheritance, often referring to the realization of inheritance, this multiple inheritance is not advocated.
The multiple inheritance used in COM actually refers to interface inheritance, that is: functional inheritance
We often say that targeting an interface rather than implementing programming is reflected here. By inheriting the interface, the data and methods are separated, and at the same time,
The same calling method of the same type of class is reached (that is, the subclass can be called through the parent class)
In fact, this method is the same as the interface in Java, except that C ++ (or COM) is implemented by abstracting the parent class. |
|