Hey,
I'm trying to set up a function pointer so that ANY function can be passed to it as long as it's the same signature.
Example
// Define a simple function pointer
typedef void (*FuncPointer)();
void someFunc()
{
}
int main()
{
FuncPointer func = someFunc;
func();
}
// This works no prob
// Now here is what I want to do
class A
{
public:
void foo();
};
// Define a simple function pointer
typedef void (*FuncPointer)();
int main()
{
// This is what I want to work
FuncPointer func = A::foo;
// I want it to work without having to define a function pointer like this
typedef void (A::*FunctionPointer)()
/*
IS THIS POSSIBLE?
*/
func();
}