I have a function with the following prototype:
void func(int an, ...);
And I would like to store the adress of this function and call it later. I have really no idea to how to do that, I desesperatly tried :
void (*funcPtr)(int, ...); // Declaration
funcPtr = func; // Storage
(*funcPtr)(3,2,5); // Call
This code compiles fine, but at execution it does crap, when I enter my function the arguments in my va_list are not the ones I sent.
Thanks in advance
EDIT : Alright, I just forgot the first argument. In my code above, the call line should be replaced with:
(*funcPtr)(3,3,2,5); // Call