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 does sksksk mean in text slang?
#include
c++ program to swap the objects of two different classes
Why is static class not inherited?
write a code for this:trailer recordId contains a value other than 99, then the file must error with the reason ‘Invalid RECORD_ID’(User Defined Exception).
what are the different types of qualifier in java?
What is multilevel inheritance in oop?
What is advantage of inheritance?
What does no cap mean?
what is the sylabus for priliminaries?
What is abstraction in oop?
What is the point of polymorphism?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What are the benefits of polymorphism?
What are the advantages of polymorphism?