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
Why is c++ still best?
Is python better than c++?
What is meant by a delegate?
what is Member Functions in Classes?
List down the guideline that should be followed while using friend function.
What is a container class? What are the types of container classes in c++?
What is the difference between c++ and turbo c++?
Difference between overloaded functions and overridden functions
What is iostream in c++ used for?
What is c++ & why it is used?
What is the use of bit fields in structure declaration?
True or false, if you keep incrementing a variable, it will become negative a) True b) False c) It depends
When the constructor of a base class calls a virtual function, why doesn't the override function of the derived class gets called?
Which software is used for c++ programming?
Can a list of string be stored within a two dimensional array?