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
Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).
Is it possible for a member function to use delete this?
Briefly describe a B+ tree. What is bulk loading in it?
What is c++ runtime?
How do you print a string on the printer?
How would you use the functions memcpy(), memset(), memmove()?
What is virtual function? Explain with an example
what kind of projects are suitable for c and c++
Can malloc be used in c++?
Why c++ does not have finally?
Define linked lists with the help of an example.
what is the difference between linear list linked representaion and linked representation? what is the purpose of representing the linear list in linked represention ? is it not avoiding rules of linear represention?
Can a class be static in c++?
Where do I find the current c or c++ standard documents?
Differentiate between declaration and definition.