what is virtual function in c++

Answer Posted / sree

virtual function comes into picture while inheriting the
base class functions to the derived class functions.
ifthe virtual isnot used then the pointer of derived class
points to the baseclass function

Is This Answer Correct ?    28 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the features of oop?

645


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.

649


What are the types of abstraction?

570


Get me an image implementation program.

1569


Can we create object of interface?

615






What are the 3 principles of oop?

630


What is the point of oop?

666


Why it is called runtime polymorphism?

583


What are the important components of cohesion?

563


What are the benefits of oop?

613


What is polymorphism and its types?

609


What is pure oop?

603


What are properties in oop?

617


write a program to find 2 power of a 5digit number with out using big int and exponent ?

1907


What is the important feature of inheritance?

641