Its pretty rare for me to post questions here but I came across this one about qsort I can't answer. If I try to sort an array of character strings such as char array[255][20]
qsort works ok as expected. But if I declare the array like this qsort fails: char*array[255]
// this is ok
char array[255][20];
int NumStrings = 0;
// fill in the array is not shown here
qsort(array, NumStrings, sizeof(array[0]), compare);
or
// this fails
char* array[255]= {0};
int NumStrings = 0;
// fill in the array is not shown here
qsort(array, NumStrings, sizeof(array[0]), compare);