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 local variable?
Declare a class vehicle and make it an abstract data type.
What is the real purpose of class – to export data?
Is string data type in c++?
What is a forward referencing and when should it be used?
What it is and how it might be called (2 methods).
How does list r; differs from list r();?
Does there exist any other function which can be used to convert an integer or a float to a string?
How to implement is-a and has-a class relationships?
Why main function is special in c++?
What is the need of a destructor?
What is purpose of new operator?
How much do c++ programmers make?
Name the implicit member functions of a class.
What is a tree in c++?