Is there any method to call a function, by just knowing its address in a pointer, lets say a pointer of type "void *(*)(void *)", and number and type of its parameter?
The function could have any number of parameters!
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.
No, not in any portable or standard way.
However, there is a standard way to pass a variable number of arguments between functions. Have a look at
vsprintf. Basically, you need a version of the function that accepts ava_list.