When qsort
ing an array of T, your comparison function must convert its const void*
pointers to const T*
, because T can't be taken by value.
If words
is an array of char*
or char const *
, you have to convert the arguments to char* const *
or char const * const *
respectively, it's natural when said this way.