Jan 21, 2009

Template vs. Inheritance. Why use one over the other?

Template vs. Inheritance. Why use one over the other?
A template should be used to generate a collection of classes when the type of the objects does not affect the behavior of the class's functions.
Inheritance should be used for a collection of classes when the type of the objects does affect the behavior of the class's functions.

No comments:

Post a Comment