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
Why do we use oop?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
What is the importance of oop?
What type of loop is a for loop?
What is interface in oop?
can inline function declare in private part of class?
There are two base class B1,B2 and there is one class D which is derived from both classes, Explain the flow of calling constructors and destructors when an object of derived class is instantiated.
What is encapsulation in ict?
Can we create object of abstract class?
Which is better struts or spring?
Can we define a class within the interface?
What do you mean by abstraction?
What does I oop mean?
write a C++ program for booking using constructor and destructor.
What is static modifier?