Technical Discussion :: C++
Home > Technical Interview Q&A > C++ > Discussion
54 / 187
What do you mean by pure virtual functions?
Answer:
A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero.
class Shape { public: virtual void draw() = 0; };
Asked In ::
Amit Yadav
23 Feb, 2019 5:07 AM
A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero.
class Shape { public: virtual void draw() = 0; };
class Shape { public: virtual void draw() = 0; };