Returning by value looks like the simplest approach.

in case of
template <> char * maxn<char *>(char * t, int n);
there's no reasonable way to pass more than one string and creating separate template, like you did, defeats the purpose of this problem.