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 are the features of oop?
What are different types of JVM's? for example we use dalvik jvm for android then what about the remaining operating systems?
What is object-oriented programming? Webopedia definition
class type to basic type conversion
How do you achieve runtime polymorphism?
What is oops in simple words?
What is polymorphism used for?
What is the benefit of oop?
What is encapsulation selenium?
Can you inherit a private class?
What is overriding vs overloading?
What does and I oop mean?
What is interface? When and where is it used?
How to handle exception in c++, For example in a functions i am assigning memory to some variables and also in next instructions in am dividing one variable also. If this functions generates a error while allocating memory to those variable and also while dividing the variable if i divide by zero then catch block how it will identify that this error has cone from perticular instruction
What are oops methods?