Hi.
I would like to sort some short integers using "qsort".
CVI returns an error message "Type error in argument 4 to `qsort'; calling convention mismatch.".
I also tried some example code pieces that worked with gcc and mcc, but CVI compiler returns the same error.
A strange convention or a bug?
Thanks, Matti
Sort command:
qsort ((void *)input, (size_t)num, (size_t)sizeof(short), CompareShorts);
Comparison function:
int CompareShorts(const void *element1,const void *element2)
{
short *a1,*b1;
a1=(short *)element1;
b1=(short *)element2;
return (*a1<*b1) ? -1 : (*a1>*b1) ? 1 : 0;
}