Suppose I have 10 functions.
f0,f1.....f9 (all void x(void))
void (*func)(void) ; //this is inside a struct (or a c++ class )
and there is another function
void foo(object,int); // or object.foo(int) in c++
How would I specify(with the minimum amount of code involved) that
foo(object,n) should call *(func[n])() which is, in turn synonymous to a call to fn()
[Do tell if a c++ based solution also works ]