Sahaj.blogs

Day page

11 Dec 2023

Study

C++ · OOP: inheritance and virtual functions

Public inheritance, virtual functions and runtime polymorphism, override, pure virtual (abstract) classes, and virtual destructors.

  • Only virtual functions are dispatched on the object's real type at runtime.
  • A base class used polymorphically needs a virtual destructor.

Read the post →