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
What is linked list in c++?
If a function doesn’t return a value, how do you declare the function?
How many keywords are used in c++?
What is the use of class in c++?
What are c++ manipulators?
What is difference between malloc()/free() and new/delete?
Snake Game: This is normal snake game which you can find in most of the mobiles. You can develop it in Java, C/C++, C# or what ever language you know.
Is atoi safe?
What operators can you overload in c++?
Evaluate the following expression as C++ would do :8 * 9 + 2 * 5 a) 82 b) 79 c) 370 d) list
Write a program for Divide a number with 2 and Print the output ( NOTE: Check for divide by zero error).
Can a class be static in c++?
What is the use of ::(scope resolution operator)?
What are the rules about using an underscore in a c++ identifier?
What does iomanip mean in c++?