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 flag in computer?

608


Can a constructor be private?

584


What are abstract data types in c++?

540


What is the disadvantage of using a macro?

593


total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.

2083






When is the copy constructor called?

637


What are friend classes? What are advantages of using friend classes?

612


How many types of classes are there in c++?

600


Define stacks. Provide an example where they are useful.

583


Explain the difference between overloading and overriding?

616


What is pointer -to-members in C++? Give their syntax?

599


How can you quickly find the number of elements stored in a dynamic array? Why is it difficult to store linked list in an array?

564


What are shallow and deep copies?

636


What are static member functions?

621


Explain what are mutator methods in c++?

572