Suppose I have a variable, that stores the callback.
void* (*function)(int, double);
Now I would like to create a function, that will return this callback. I do not want the user to access the callback directly but by a function. This doesn’t work:
void* (*)(int, double) getCallback();
My question is: What will the prototype for such function look like?
typedefthe callback type:This will also make sure that there are no mistakes from manually typing the wrong signature and such.