You have one base class virtual function how will call that
function from derived class?
Answer Posted / narendra
class A
{
public:
virtual void fun()
{
cout<<"class A\n";
}
};
class B:public A
{
public:
virtual void fun()
{
cout<<"class B\n";
A::fun(); //calling base class virtual function.
}
};
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
i=20;k=0;
for(j=1;k-i;k+=j<10?4:3)
{
cout< What is constructor overloading in oop? What is difference between abstraction and encapsulation? What is difference between pop and oop? Question:
Implement a base class Appointment and derived classes Onetime, Daily, Weekly, and
Monthly. An appointment has a description (for example, “see the dentist”) and a date
and time. Write a virtual function occurs_on(int year, int month, int day) that checks
whether the appointment occurs on that date. For example, for a monthly appointment, you must check whether the day of the month matches. Then fill a vector of
Appointment* with a mixture of appointments. Have the user enter a date and print out
all appointments that happen on that date. 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 type of question are asked in thoughtworks pair programming round ? What is polymorphism explain its types? What are the two different types of polymorphism? Can an interface inherit a class? Which is not an object oriented programming language? What is difference between oop and pop? design a c++ class for the chess board,provide a c++ class
definition for such class(only class definition is required) What polymorphism means? What are classes oop?