Можно так.. func1(void){}
func2(void){}
class base {
public;
void* pointer;
base():pointer = NULL{}
}
class a : public base {
public:
a():pointer = func1{}
}
class b : public base {
public:
b():pointer = func2{}
}
---- user ------
base* a1 = new(a);
base* b1 = new(b);
( ((*f)(void))a1->pointer)();