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 using namespace std in c++?
What is a stack? How it can be implemented?
What is difference between c++ and c ++ 14?
What is istream and ostream in c++?
In a function declaration, what does extern mean?
Can non graphic characters be used and processed in C++?
Explain deep copy?
write a programme to get a character and thier ASCII value
Is c++ used anymore?
How can you say that a template is better than a base class?
What is the size of a vector?
What is polymorphism and its type in c++?
Can I learn c++ without c?
What is #include math h in c++?
What does h mean in maths?