I understand virtual functions, but I am confused with virtual base classes and how it would work internally. Can someone please help?
class Base { };
Derived: virtual public Base { };
I do understand there is a single copy which is passed on to Derived classes.
- But can someone please explain how this works internally?
- How it will be similar or different to virtual functions ?
-
And how the call to base methods will get resolved?
-
What happens if the Derived class has virtual base class and a virtual function?
Thanks.
Aucun commentaire:
Enregistrer un commentaire