473,407 Members | 2,326 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

what is virtual base class? What is its use?

virtual base class
Jul 17 '10 #1
2 1572
Banfa
9,065 Expert Mod 8TB
That is the type of basic question that you should really try searching the web for first either using a search engine or what I sometimes do is try Wikipedia directly.

If you had you would have easily found these pages

Virtual Base Classes
Virtual inheritance

The long and the short of it is that virtual inheritance prevents having more than one instance of a base class somewhere in the tree when you end up with the diamond inheritance pattern.
Jul 17 '10 #2
Dheeraj Joshi
1,123 Expert 1GB
Google first, if you still have doubts, or ff you have a specific question, please post here.

Regards
Dheeraj Joshi
Jul 17 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: dumboo | last post by:
hi there i m having a base class class base { ... }; and two derived class, which have inherited 'base' but the inheritance is not virtual
2
by: Chunhui Han | last post by:
Hi, I was recently reading about virtual base classes in C++. The book I was reading says that it is illegal to have non-virtual destructor for the virtual base class. It seems to me that...
14
by: mshetty | last post by:
Hi, I get an error "Warning: b::a_method hides the virtual function a::a_method()." on compiling the following code.. #include <iostream.h> class a {
5
by: Peter Hagenaar | last post by:
Hello there. I have a question about a virtual template class. The class wich derives from this class overrides a virtual method in this template base class and calls the same method in this...
0
by: Thomas Maier-Komor | last post by:
Hi, let's assume there is an abstract base class (ABC), which is inheritet virtually by two classes (A,B). A and B themselves are inheritet by another class (C). What kind of overhead should I...
7
by: sreelakshmi.rajula | last post by:
Does it allow virtual functions in Virtual base class? I am getting errors in the following code.Anything wrong in this code?I want to print Eagle's age. Can anybody clarify my doubt? class...
4
by: RashmiS | last post by:
Hi! Are vtables created for two classes which has a common derived class and a common base class ( virtual base class) ? Please explain.
3
by: nw | last post by:
Hi, I have three classes, a template pure virtual base class, a template derived class and a third which I would like to use to store copies of the derived class. The code looks like this: ...
7
by: BeautifulMind | last post by:
In case of inheritence the order of execution of constructors is in the order of derivation and order of destructor execution is in reverse order of derivation. Is this case also true in case...
7
by: arnaudk | last post by:
How come it's possible to have a base class with a pure virtual destructor and nonetheless one has to implement the destructor? Doesn't pure virtual mean that there is no implementation of that...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.