Please explain const void *a, const void *b on the code bellow. Are these constant reference parameters - meaning the inner code of this function cannot change its value? Why make these parameters a reference? Thought a reference parameter is meant to be for pass by value and allow value to be change inside the function definition. Why use void for a parameter argument?
int peak_compare(const void *a, const void *b) //Function peak_compare
{
Peaks *aa = (Peaks *)a;
Peaks *bb = (Peaks *)b;
if(aa->wt1 > bb->wt1) return -1;
if(aa->wt1 == bb->wt1) return 0;
return 1;
}
Thanks for any advise.