Computer Science, asked by shaillygupta7012, 11 months ago

What is a virtual base class? Explain it by taking an example

Answers

Answered by Anonymous
4

Answer:

Virtual base classes, used in virtual inheritance, is a way of preventing multiple "instances" of a given class appearing in an inheritance hierarchy when using multiple inheritance. ... When you specify virtual when inheriting your classes, you're telling the compiler that you only want a single instance.

Thanks

Similar questions