Here is the program. I want the function specialization to be doing what testing_func is currently doing in this program. I am aware you can have something along the lines of <char *> after max5 in the function specialization but nothing I've tried in it gets things working.
I believe you have to specify all but the left most dimension of arrays. (Though I know you can use different notation instead of array[][size_of_second_element] I just find that notation to be clearest.)
Okay help I got from someone else told me to change the
template <> char * max5(char string_arr[][10], int elem_num);
to
template <> char * max5<char *>(char *string_arr[10], int elem_num);
It compiled perfectly with quotes removed, until I tried to utilise the function (change testing_func to max5) at which point it came up with the error
'Failed to specialize function template with the following arguments char[10]'
So still no luck.
Made a foolish error, I forgot to change the array declaration from string_arr[4][10] to *string_arr[4] With that done the code compiles and runs.
The final program:
#include "stdafx.h"
template <class T>
T max5(T *max_val, int elem_num);
template <> char * max5<char *>(char *string_arr[4], int elem_num);