Skip to content

Glossary: Software Design Patterns in C++

Virtual function

Also written: virtual, virtual functions

A member function marked `virtual` so a call through a base pointer or reference runs the child's version. It is how abstract classes, strategies and most class-based patterns work.

Where the book teaches it

Related terms

overridePure virtual functionVirtual destructor