When is a template better solution than a base class??
Answer Posted / mayank kumar
as template is in form of generic class and generic
function so here the class and function works for all. also
in template we can change the data type of function
parameter as well as of the data member present in class.
| Is This Answer Correct ? | 7 Yes | 0 No |
Post New Answer View All Answers
What is a float in c++?
Explain deep copy?
What is data structure in c++?
What is helper in c++?
Explain how to initialize a const data member.
How does class accomplish data hiding in c++?
What is a string example?
What is the purpose of ios::basefield in the following statement?
What is while loops?
Why do we use the using declaration?
Do the parentheses after the type name make a difference with new?
Differentiate between structure and class in c++.
What is the best free c++ compiler for windows?
What do you know about near, far and huge pointer?
Explain the operation of overloading of an assignment operator.