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
Define token in c++.
What are the c++ access specifiers?
What is meant by const_cast?
What is an operator function? Describe the function of an operator function?
Explain the uses of static class data?
What is ios flag in c++?
Is c++ a programming language?
write a programme to get a character and thier ASCII value
What is called array?
Can a function take variable length arguments, if yes, how?
Does there exist any way to make the command line arguments available to other functions without passing them as arguments to the function?
What are virtual constructors/destructors?
Can I learn c++ as my first language?
What is the best c++ compiler for windows 10?
What is a manipulator in c++?