how do I declare an array of pointers to functions?
The C programmer's response to this question:
use cdecl.
cdecl> declare functable as pointer to
function (int,pointer to int)
returning double
double
(*functable)(int , int *)
cdecl> declare functable as array 17 of pointer to function (int) returning double
double (*functable[17])(int )
Note that functions automatically convert into pointers to functions, in the same sense that arrays decay into pointers. You don't need an & to take the address of a function to put it in a pointer.
If you're in C++, it might help to use a std::map<YourFunctionPointerType> instead of an array, since you want to map strings anyway...
The OO approach:
Use polymorphism instead. It doesn't immediately solve your problems, but there's a good chance that if you're doing this it makes sense to have a class for each function.
Note that a vtable is, fundamentally, a table of pointers to functions.