Daniel M. answered 06/04/19
Award Winning Lead Software Engineer and College Instructor
Take the following example:
typedef int( *func_ptr )( int param_one, double param_two );
This statement creates a variable type called func_ptr which will (must) points
to a function that takes two parameters, an integer and a double and returns and integer.
If you define a function such as:
int sample( int one, double two ) {
int result = one;
if ( two > 2.0 ) result *= 2;
return result;
}; // end sample
and assign it to a variable of type func_ptr:
func_ptr var_name = sample;