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.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment