What is pure virtual function
Answers
Answered by
3
A pure virtual function is a function that must be overridden in a derived class and need not be defined. A virtual function is declared to be “pure” using the curious =0 syntax.
Answered by
1
In object-oriented programming, in languages such as C++, and Object Pascal, a virtual function or virtual method is an inheritable and overridable function or method for which dynamic dispatch is facilitated. This concept is an important part of the (runtime) polymorphism portion of object-oriented programming (OOP). In short, a virtual function defines a target function to be executed, but the target might not be known at compile time.
Similar questions
Social Sciences,
1 month ago
Geography,
1 month ago
Math,
2 months ago
English,
9 months ago
Math,
9 months ago
Computer Science,
9 months ago