What will happen if I have base class with function fun(), and this base class is derived into classes der1, and der2. Now assume that class der3 inherits both der1, and der2. Is there any problem in this scenario?
no error, its proper. C++ allows multiple inheritance.
we have to use virtual keyword for function fun() in base class. Else it gives compile time error.
It will give compile time error, only if we try to access fun() by using Der3 object. This is because of ambiguity.
Back To Top