Technical Discussion :: C++
Home > Technical Interview Q&A > C++ > Discussion
109 / 187
What is meant by member function template?
Answer:
The member functions of the template classes themselves are parameterized by the type argument and therefore the function must be defined by the function template.
Syntax:
Template
return type classname
{
……………(function body)
…………….
}
Asked In ::
Madhu M
23 Feb, 2019 5:07 AM
The member functions of the template classes themselves are parameterized by the type argument and therefore the function must be defined by the function template.
Syntax:
Template
return type classname : : function name(arglist)
{
……………(function body)
…………….
}
Syntax:
Template
return type classname
{
……………(function body)
…………….
}