When is a template a better solution than a base class, C/C++ Programming

When you are designing a generic class to have 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 (therefore, the genericity) to the designer of the container or manager class.            

 

 

Posted Date: 4/9/2013 12:58:35 AM | Location : United States







Related Discussions:- When is a template a better solution than a base class, Assignment Help, Ask Question on When is a template a better solution than a base class, Get Answer, Expert's Help, When is a template a better solution than a base class Discussions

Write discussion on When is a template a better solution than a base class
Your posts are moderated
Related Questions
The ability to verify at run time the type of an object by using the typed operator or the dynamic_cast operator.

make use of class objects two calculate average


solution of problem based on poiter

a program that declares and prompts the user to enter two integer and performs the five arithmetic operations

program for lexicographically precedes the given input permutation

write a C code that plots an object on the window and on the user''s click of mouse on the window, the object starts rotating continuously until the user presses the mouse again

what is the first thing I need to know about Programming?

A: No. If they're utilized properly, they increase encapsulation. You frequently require splitting a class in half while the two halves will have distinct numbers of instances o

What do you mean by a sequential access file? - When writing programs which store and retrieve data in a file, it's possible to designate that file into various forms. - A s