BTW there is a weirdness here in C and C++.
The name of a function is the address of the function. So the address of
is myFunc. You call the function by
There are some people who see myFunc as an address of a function so you would need to *myFunc to access the actual function:
Because of this both ways of calling a function are supported.
In your case, the loop could be:
- for (index = 0; index <MAX; index++)
-
{
-
funp[index]();
-
}
which is easier to read without the de-reference operator.