<<< Inheritance of mix-ins | Index | The basic idea: redirecting calls >>> |
Polymorphism: using something in multiple ways
E.g. overloading operator+()
E.g. or std::vector< int >
Dynamic polymorphism defers the decision about how to do something until runtime.
C++ provides a form of function overloading that yields dynamic polymorphism:
Works (only!) through pointers or references;
Uses inheritance, meaning that polymorphism is restricted to types derived from some common base.
<<< Inheritance of mix-ins | Index | The basic idea: redirecting calls >>> |