T (*array_of_functions[10])();
Where T is the return type of each function (all functions return the same type, naturally). Everything becomes complicated if you want to store function pointers with different parameter numbers / types:
int foo(void) {...} int bar(int x) {...} int bletch(double y, double z) {...} ... int (*array_of_functions[10])() = {foo, bar, bletch, ...};
If so, you will need to keep track of how many and types of parameters each function requires so that you can correctly name it.
In fact, I am typing typedefs for types of function pointers; they tend to obscure as much as they simplify.
source share