How to call with function pointer this function?
double a(double *a){
return *a;
}
I try this but without luck:
double (*p)(*double) = &a;
I didn't find much good tutorial for those purpose, can you refer me to some good link.
Like this:
double (*p)(double*) = &a;
As you can see, the function signature in the type of the function pointer is written in exactly the same way as in the actual function declaration (and you don't need to the arguments names).
double *a) suggested that the * belongs to a, not double. That is probably the root cause.