You should change the types that were char* to const_char_p (especially longest which is going to be returned as the latter).
The way you are iterating through the array is a bit odd. Why not do the...
Type: Posts; User: DavX
You should change the types that were char* to const_char_p (especially longest which is going to be returned as the latter).
The way you are iterating through the array is a bit odd. Why not do the...
First off, you need to make your specialisation fit the form of the template.
Since your template is:
template<typename T>
T maxn( T* a, int n );
Your specialisation needs to simply...