The last parameter of this line in main()
makes me lost
// declaration
void qsort(char *linep[], int left, int right, int (*compare)(void *, void*);
// use
main(){
qsort((void**) lineptr, 0, nlines-1, (int (*)(void*,void*))(numeric ?
numcmp : strcmp));
}
I understand the ternary operator but let's say numeric == 0 then what does this mean?
(int (*)(void *, void*))strcmp;
Do datatypes of function parameters mismatch?
int strcmp(const char*, const char*);
void qsort( , , , int(*)(void*)(void*);
Can I typecast a function pointer?