Im doing a homework assignment and am stuck on a question which i feel should be rather easy, but is giving me a really hard time. Please help a guy out.
how can you pass a "void pointer" to a pointer-to-function in order to make the pointer-to-function take more than one type of argument.
Code:#include <iostream> using namespace std; void f1(int i) { cout<< "result: " << i << endl; } void main() { void (*fp)(void*); //?? as apposed to=> void (*fp)(int) fp = f1; fp(3); }



LinkBack URL
About LinkBacks



