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
What is flag in computer?
Can a constructor be private?
What are abstract data types in c++?
What is the disadvantage of using a macro?
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.
When is the copy constructor called?
What are friend classes? What are advantages of using friend classes?
How many types of classes are there in c++?
Define stacks. Provide an example where they are useful.
Explain the difference between overloading and overriding?
What is pointer -to-members in C++? Give their syntax?
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?
What are shallow and deep copies?
What are static member functions?
Explain what are mutator methods in c++?