what is a virtual class?
Answer Posted / ramakrishna
It is used to avoid the ambiguity problem in c++ (multiple
inheritance).
when sub class inherits same members from 2 base classes.
compiler dont know which variable has assigned the value.
If u declare the class as virtual only one time is
inherited in its derived class.A copy will never get
inherited.
concept of virtual methods is different purpose.
like how we have abstract key word in java,we can acheive
method abstraction using virtual keyword before a method.
please select no if u really know this answer is wrong.
people with out having knowlede saying simple know hurts
the technical world.
Regards,
Ramakrishna Yechuri
sr corporate Trainer
yrk_in@yahoo.com
Is This Answer Correct ? | 6 Yes | 2 No |
Post New Answer View All Answers
What is inheritance in simple words?
What is inheritance and how many types of inheritance?
How do you explain polymorphism?
#include
What is the benefit of oop?
Can main method override?
Why is object oriented programming so hard?
Why is oop useful?
Why do we use class in oops?
What do you mean by overloading?
Can enum be null?
Write a c++ program to display pass and fail for three student using static member function
class type to basic type conversion
What is encapsulation process?
Explain the concepts involved in Object Oriented programming.