problem with incompatible pointer type
When compiling one of my function, it gives me a warning message
"passing arg 4 of 'qsort' from incompatible pointer type"
what does this mean?
here's some of the codes that's related
Code:
int compare(int *key1, int *key2)
{
return (*key1 - *key2);
}
void mysort(int *keyArray, int nel, int width, int (*compare)(int *, int *))
{
qsort(keyArray, nel, width, compare);
}
and I have initialised
int *keyArray;
in my main function
did I pass in some wrong arguments into the library function qsort?
Code tags added by kermi3