Sowas?
Code:/* Definition */ struct type_A; typedef char (*type_B)(struct type_A*); typedef struct type_A { type_B B; } type_A; /* Anwendung */ char fooB (type_A*); type_B b = fooB; type_A a = { fooB }; char dispatch (type_A *a) { return a->B (a) + B(a); }
Lesezeichen