What is Pure and virtual functions.
Answers
Answered by
0
here your answer
A pure virtual function or pure virtual method is a virtual function that is required to be implemented by a derived class if the derived class is not abstract classes containing pure virtual method are termed " abstract" and they cannot be instantiated directly.
I hope it's can help you
A pure virtual function or pure virtual method is a virtual function that is required to be implemented by a derived class if the derived class is not abstract classes containing pure virtual method are termed " abstract" and they cannot be instantiated directly.
I hope it's can help you
Answered by
0
Virtual function: A function will have its definition in the “base class” and if required it can be redefined in the derived class. The function will have the keyword “virtual” in the function signature.
Pure virtual function: This would have only function declaration in the “base class” and the class which is implementing the base class should give definition for the “pure virtual function”. This signature would be same as virtual function but the “function will be equal to 0”.
Similar questions