What is a virtual base class? Explain it by taking an example
Answers
Answered by
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
English,
5 months ago
Social Sciences,
5 months ago
Political Science,
11 months ago
Business Studies,
11 months ago
Political Science,
1 year ago
India Languages,
1 year ago