What are templates? where we should use it?
Answer Posted / satheeshkumar
Template allow us to write one function and class that
works for different datatype .
Use :
Create a type safe collection class that can operate on
data of any type.
add extra type checking for function.
Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What is a local variable?
What are the 4 types of library?
Can we use pointers in c++?
Are c and c++ different?
Can a new be used in place of old mallocq? If yes, why?
Is c++ a good first language to learn?
Is it legal in c++ to overload operator++ so that it decrements a value in your class?
What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?
Explain the static storage classes in c++.
What does ios :: app do in c++?
Can we delete this pointer in c++?
Which recursive sorting technique always makes recursive calls to sort subarrays that are about half size of the original array?
What is the purpose of templates in c++?
What gives the current position of the put pointer?
What is the difference between function overloading and operator overloading?