Class A inherits from B
B inherits from C
C inherits from D
Now D has 2 pure virtual functions x() and y(). i.e.
x() = 0;
y() = 0;
Function x() is defined in Class C
Function y() is defined in both Class B and Class C
Now A is instantiated and object of class A calls function x(). i.e.
A aObj = new A;
The call comes to the function defined in Class C
Now y() is implemented both in class B and C.
At this point of time can anyone tell ideally where the flow should go. i.e. C::x() will call C::y() or B::y() ?
The result i got from logs was quite different from what i was expecting, so if someone can give a proper explanation it would be appreciated
Thanks in advance.