What is Pure Virtual Function? Why and when it is used ?

Answer Posted / guest

The abstract class whose pure virtual method has to be
implemented by all the classes which derive on these.
Otherwise it would result in a compilation error.
This construct should be used when one wants to ensure that
all the derived classes implement the method defined as
pure virtual in base class.

Is This Answer Correct ?    77 Yes 44 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is rtti in c++?

625


What is a loop? What are different types of loops in c++?

591


What is a dangling pointer in c++?

652


What is the basic difference between C and C++?

620


Why is c++ still popular?

585






What do you mean by “this” pointer?

615


What is the purpose of template?

605


Which compiler does turbo c++ use?

599


Where the memory to the static variables is allocated?

557


What is a friend function in c++?

576


What are shallow and deep copy?

592


What's c++ used for?

589


Mention the ways in which parameterized can be invoked. Give an example of each.

568


Explain virtual class?

581


What is nested class in c++?

514