What is virtual class and friend class?
Answer Posted / vaibhav panchal
A virtual class is an inner class that can be overridden by
derived classes of the outer class.
eg.
class Base
{
public:
int value
};
class child1 : public Base { };
class child2 : public Base { };
class grandchild : virtual public child1, virtual public
child2
{
public:
grandchild() { value };
};
Is This Answer Correct ? | 38 Yes | 4 No |
Post New Answer View All Answers
What is polymorphism in oops with example?
What is Difeerence between List obj=new ArrayList(); and ArrayList obj=new ArrayList()?
Why is object oriented programming so hard?
How Do you Code Composition and Aggregation in C++ ?
What does enum stand for?
What is destructor in oop?
Can main method override?
What are constructors in oop?
What is Difference Between Inheritance and creating object and getting data? means Class A extends B{ B.getMethod();} (OR) Class A{ b obj=new B(); obj.getMethod(); }
What are the 3 principles of oop?
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.
What is encapsulation oop?
What is inheritance in simple words?
What is the point of polymorphism?
Advantage and disadvantage of routing in telecom sector