What is the difference between virtual functions and pure virtual functions?

Answer Posted / hrpynux@gmail.com

A virtual function is a member function of base class which can be redefined by derived class. A pure virtual function is a member function of base class whose only declaration is provided in base class and should be defined in derived class otherwise derived class also becomes abstract.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a superclass in oop?

788


Is c++ an oop?

693


Distinguish between new and malloc and delete and free().

653


What is singleton class in c++?

689


What is a stl vector?

705






Can main method override?

665


How is class defined?

685


Is c++ still in demand?

733


What is a null object in c++?

736


Is it possible for a member function to use delete this?

653


what type of question are asked in thoughtworks pair programming round ?

1847


What are manipulators used for?

708


give me an example for testing a program showing the test path .show how the test is important and complex.

2532


Can a program run without main?

735


I want explanation for this assignment: how to connect mysql database using c/c++,please explain this detailly?

1661