When is a template better solution than a base class??
Answer Posted / faruk
1.when you are designing a generic class to contain or otherwise manage objects of other types.
2.when the format and behaviour of those other types are unimportant to their containment or management.
3.particularly when those other types are unknown.
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is format for defining a structure?
How should a contructor handle a failure?
What is the difference between an external iterator and an internal iterator?
What is a list c++?
What is a local reference?
What is meaning of in c++?
Which operator cannot overload?
What is input operator in c++?
Write about the stack unwinding?
Is the declaration of a class its interface or its implementation?
How can we access protected and private members of a class?
Explain what is class definition in c++ ?
What is runtime polymorphism in c++?
What are references in c++?
What is #include iomanip?