I have written a function template and an explicitly specialized templated function which simply takes in 3 arguments and calculates the bi
I ran into the same problem and fixed it by using typedef:
typedef char * charPtr;
template <>
void Max(charPtr &a, charPtr &b, charPtr &c)
You need to take the pointers by reference:
template <>
void Max(char*& a,char*& b,char*& c)
That said, it would be better not to use an explicit specialization and instead just overload the function:
void Max(char* a, char* b, char* c)
It's almost always a bad idea to specialize function templates. For more, see Herb Sutter's "Why Not Specialize Function Templates?"