You have one base class virtual function how will call that
function from derived class?
Answer Posted / swetcha
class a
{
public virtual int m()
{
return 1;
}
}
class b:a
{
public int j()
{
return m();
}
}
Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
Who invented oop?
What is oops with example?
hi all..i want to know oops concepts clearly can any1 explain??
why reinterpret cast is considered dangerous?
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.
What is the example of polymorphism?
What are objects in oop?
INSTANCE FIELDS DECLARED private ARE ACCESSIBLE BY THE METHODS ONLY.CAN WE CHANGE THE private FIELD OF AN OBJECT IN A METHOD OF SOME OTHER OBJECT OF THE SAME CLASS?
What is polymorphism in oop example?
What does no cap mean?
Can main method override?
What is a class in oop?
What is oops and its features?
What is the real time example of inheritance?
What is inheritance write a program to show use of inheritance?