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.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Like this:
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).