Suppose I have these three functions:
bool A(); bool B(); bool C();
How do I call one of these functions conditionally using a function poi
You can declare the function pointer as follows:
bool (funptr*)();
Which says we are declaring a function pointer to a function which does not take anything and return a bool.
Next assignment:
funptr = A;
To call the function using the function pointer:
funptr();