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
Incase of a function declaration, what is extern means?
What are friend classes? What are advantages of using friend classes?
What is a container class?
What is an adaptor class in c++?
What is bubble sort c++?
Explain what are single and multiple inheritances in c++?
What is constructor in C++?
Is c++ slower than c?
In a function declaration what does extern means?
Can comments be longer than one line?
Write syntax to define friend functions in C++.
What is private inheritance?
What is object oriented programming (oop)?
In c++, what is the difference between method overloading and method overriding?
What is static in c++?