what is a pure virtual function in c++?
how to use of a pure virtual function and when?
what kind of a special significance does a pure virtual function have and why doest it said to exhibit run time polymorphism??
what is a pure virtual function in c++?
how to use of a pure virtual function and when?
what kind of a special significance does a pure virtual function have and why doest it said to exhibit run time polymorphism??
In a class declaration, 'virtual ret_type f(args ...) = 0;' is a pure virtual function (as denoted by the = 0). These make the class an abstract data type which cannot be instantiated, and therefore, force all derived classes (which are not intended to be ADTs themselves) to override this function. You can have pointers to this base class, however, so you can use the polymorphic behavior as normal.
They are good to use when all derived classes should have the specified function(s) (hence virtual), and when there is no way to implement it in a generic enough way in the base class for use by any derived class.
The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.