Loading...
Loading...
Loading Curriculum...
Loading Subject...
Loading Topic...
Loading Lesson...
Loading Lab...
The ability of a single interface to handle different underlying data types. In C++, it comes in two main flavors: Compile-time and Runtime.
Resolved during compilation. Faster performance.
Resolved during execution. More flexible design.
It allows you to write generic code that can work with any class in a hierarchy. For example, a Shape* array can store Circles, Squares, and Triangles, and calling draw() will execute the correct method for each.