Answer Posted / ravinandan
Template is used for generic programming. In other words
when you want to write a function or a class type
independent, go for templates.
template<class T>
void fun(T x, T y); // Is a Template function
template<typename T>
class abc{
T m;
}; // Is a Class Template
template<class T>
class abc{
T m;
}; // Is a Class Template
| Is This Answer Correct ? | 6 Yes | 0 No |
Post New Answer View All Answers
What do you mean by overloading?
What is polymorphism and types?
Why do we use class?
How do you achieve runtime polymorphism?
What is the fundamental idea of oop?
when to use 'mutable' keyword and when to use 'const cast' in c++
program for insertion ,deletion,sorting in double link list
What is overloading in oop?
Please send ford technologies placement paper 2 my mail id
What is the real life example of polymorphism?
What is use of overloading?
What is the real time example of inheritance?
What is abstract class in oops?
what is the drawback of classical methods in oops?
What is encapsulation with real life example?