Function templates means family of functions which can be used based on the data type -
Syntax
template < parameters > declaration
Sample Code
#include <iostream>
template<typename T>
void f(T s)
{
std::cout << s;
}
int main()
{
f<double>(1); // calls f<double>(double)
f<>('a'); // calls f<char>(char)
f(7); // calls f<int>(int)
void (*ptr)(std::string) = f; // calls f<string>(string)
}