When Is A Template A Better Solution Than A Base Class?

1 Answer(s)

When you are designing a generic class to contain or otherwise manage objects of other types, when the format and behavior of those other types are unimportant to their containment or management, and particularly when those other types are unknown (thus the genericity) to the designer of the container or manager class.

Scholar Answered on April 26, 2018.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.