Lecture 11 polymorphism virtual functions

Опубликовано: 03 Май 2026
на канале: Gyan Dhara by Dr. Lalit (Voice of Wisdom)
1,229
17

Definition
Virtual Functions with example
Abstract Classes
Pure Virtual function with example
Definition Virtual functions:
A virtual function is a member function that can be redefined in a derived class, while preserving its calling properties through references. ( uses virtual keyword)
Definition Abstract class & pure Virtual Function:
Abstract base classes are the classes that can only be used as base classes, and they are allowed to have virtual member functions without definition (known as pure virtual functions). The syntax is to replace their definition by =0 (an equal sign and a zero):