Can a pure virtual function have a body?
Yes, it can. One can call this function either by referring to it in the constructor/destructor of an abstract class or directly - in overridden function of descendant one can call the pure virtual function with the body of ancestor through the scope resolution operator.
C++ Quiz
Start Quiz

or Read more about C++ Quiz

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback