I've an old C function that calls a function pointed by a global function pointer. How do I get it to call a member function of a class object determined at run-time. It'll be complied in a C++ project of course.
My main motive is reusability here. So I don't want to change the C function.
Its something like this:
void (*foo)(int);
class coo
{
public:
void func(int x){ ; }
};
void cfunc()
{
foo(10);
}