explicit specialization: syntax error?
问题 I am writing a program that requires a template function having an array of items, and number of items in that array as arguments. The function needs to return the largest item in said array. The program should also have a specialization (what I'm having issues with) which checks for the longest string in the array, if an array of strings is entered. Here are my prototypes: template <typename T> T compare(T const arr1[], int n); template <> const char *compare<const char *>(const char *const