What are templates? where we should use it?
Answer Posted / prabhatkr09
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 ? | 6 Yes | 1 No |
Post New Answer View All Answers
Explain the purpose of the keyword volatile.
Explain operator overloading.
Differentiate between the manipulator and setf( ) function?
What is std namespace in c++?
What is the object serialization?
In int main(int argc, char *argv[]) what is argv[0] a) The first argument passed into the program b) The program name c) You can't define main like that
How do you clear a buffer in c++?
When should we use multiple inheritance?
What is the basic of c++?
What is the use of setprecision in c++?
Define whitespace in C++.
total amount of milk produced each morning and then calculates and outputs the number of cartons needed for this milk , the cost of producing the milk and the profit from producing this milk.
Why is it necessary to use a reference in the argument to the copy constructor?
What are formatting flags in ios class?
What is the use of register keyword with the variables?