I'm trying to get my head around function template specializations and I just can't understand what am I doing wrong here.
Prototypes and error below.
Can someone explain to me what I'm doing wrong?
Code:
// template
template <typename T>
T findMax(const T arr[], int n);
// specializations for char**
template <>
char* findMax(const char* arr[], int n);
I get the following error from GCC:
Code:
error: template-id 'findMax<>' for 'char* findMax(const char**, int)' does not match any template declaration