I\'m trying to call a function that takes an argument, void(*)(void*, int, const char*), but I cannot figure out how to pass those arguments to the function.
You can't pass ptr(20) to this function, because you can only pass the pointer to the function but not the pointer with the argument. You may read about functors and theu will help you with such problem. Or the other solution is to change the signature to
int function(int, int, void(*)(void) );
And write function
void ptr_wrap(void) {ptr(20);}
so you can call function(20, 20, ptr_wrap);. But functors can solve this problem in more elegant way.