The template construct is a way to create a generic function or class. Function template - A function template is used to define a generic function, which means the function works with different data types. code example
Example: how to write a template c++
template <class myType>
myType GetMax (myType a, myType b) {
return (a>b?a:b);
}