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


Please Help Members By Posting Answers For Below Questions

Who invented oop?

736


What is oops with example?

658


hi all..i want to know oops concepts clearly can any1 explain??

1757


why reinterpret cast is considered dangerous?

1995


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.

759






What is the example of polymorphism?

655


What are objects in oop?

701


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?

1737


What is polymorphism in oop example?

620


What does no cap mean?

683


Can main method override?

666


What is a class in oop?

678


What is oops and its features?

697


What is the real time example of inheritance?

722


What is inheritance write a program to show use of inheritance?

715