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


Please Help Members By Posting Answers For Below Questions

What is static in oop?

585


Can you name some types of inheritance?

639


What is oops and its features?

584


What does and I oop mean in text?

620


Is html an oop?

577






hi, this is raju,iam studying b.tech 2nd year,iam want know about group1 and group2 details, and we can studying without going to any instutions? please help me.

1537


What is the difference between a constructor and a destructor?

609


What do you mean by Encapsulation?

640


Why it is called runtime polymorphism?

573


What is encapsulation with example?

576


What is encapsulation example?

545


What is debug class?what is trace class? What differences are between them? With examples.

1604


write a program using c++ to implement single contiguous memory mangement techniques.display the content of the main memory after yhe allocation of jobs and percentage of the wastage of the main memory

2754


What is the difference between abstraction and polymorphism?

613


What is difference between class and object with example?

562