R
Rolf Wester
Hi,
I want to pass a C-function as a function parameter but I don't know
how to that correctly. In the example below how would I have to declare
the function argument in the my_sort function definition?
Thank you in advance for any help.
Regards
Rolf
int comp_func1(double * a1, double * a2)
{
...
}
void my_qsort(double * a, int n, (* comp_func))
{ ???????
...
comp_func(&a, &a[j]);
...
}
int main()
{
...
my_qsort(a,n,comp_func1);
}
I want to pass a C-function as a function parameter but I don't know
how to that correctly. In the example below how would I have to declare
the function argument in the my_sort function definition?
Thank you in advance for any help.
Regards
Rolf
int comp_func1(double * a1, double * a2)
{
...
}
void my_qsort(double * a, int n, (* comp_func))
{ ???????
...
comp_func(&a, &a[j]);
...
}
int main()
{
...
my_qsort(a,n,comp_func1);
}