+ 2
C++ supports multiple inheritance. What is the “diamond problem” that can occur with multiple inheritance? Give an example.
4 Answers
+ 3
@Drauchris
Thank you, for explaining!
+ 2
well. i think i can explain it like this. you have a class class cat with the property Legs and a dog class with the property legs. now you define a class CatDog which inherits from those both classes. now you have two Legs-Properties. Problem
0
and how do you avoid the diamond problem?
0
namespaces for example