Pure Virtual functions:
1)
"It has no definition in base class"
Not strictly true, it normally doesn't have a definition in the base class but you can give it a definition there if you choose; however this definition cannot be given as part of the declaration i.e.
-
class Example
-
{
-
virtual int exFun(int param) = 0
-
{
-
// Code
-
}
-
}
is invalid. Also it can only be called explicitly from a base class. Finally I have never managed to think of a situation where this feature is useful.
3)
"All derived classes must override,pure virtual function."
Again strictly not true but if they don't override it the function remains pure virtual in the derived class and the derived class is abstract although it itself could then be inherited and the pure virtual function overridden.
4)
"Gives compilation error if derived classes are not inherited."
Not quite sure what you mean here, do you mean that if you fail to override a pure virtual function in a derived class but still try to instantiate the derived class you get a compilation error? This is true because the derived class is still abstract and you can't instantiate abstract classes.