I tried this but this shows an error
template<>
int add(int a, int b)
{
return a + b;
}
But when I write the below code it works fine
template<typename T>
T add(T a, T b)
{
return a + b;
}
template<>
int add(int a, int b)
{
return a + b;
}