I
Ingo Brueckl
I need to declare a fixed array of (already defined and working) sort
functions (sortfunc1, sortfunc2, sortfunc3) to pass one element of the
array to qsort itself:
int index;
??? func[] = {sortfunc1, sortfunc2, sortfunc3};
index = /* calculated somehow */;
qsort(what, what_elements, sizeof(what_element), func[index]);
My problem: How must I declare the array correctly. (I won't use 'void *' as
recent version of gcc don't accept it and I prefer correct declarations.)
Ingo
functions (sortfunc1, sortfunc2, sortfunc3) to pass one element of the
array to qsort itself:
int index;
??? func[] = {sortfunc1, sortfunc2, sortfunc3};
index = /* calculated somehow */;
qsort(what, what_elements, sizeof(what_element), func[index]);
My problem: How must I declare the array correctly. (I won't use 'void *' as
recent version of gcc don't accept it and I prefer correct declarations.)
Ingo