I am trying to sort an array of strings, but it\'s not sorting anything.... what am I doing wrong?
string namesS[MAX_NAMES]; int compare (const void * a, co
std::qsort is inherited from the standard C library. It will not work.
You need to use std::sort for sorting strings.
Specifically, cast std::string to void* and then to char* is undefined and won't work.
std::string
void*
char*