Why aren’t all member functions virtual?
Not every class needs inheritance
The overhead, although small, exists
Sometimes functions shouldn’t be virtual (for example, operator[] in the Vector example from last lecture)
Previous slide
Next slide
Back to first slide
View graphic version