Code:
double add(double x, double y) {return x+y;} // two functions to point to
double subtract(double x, double y) {return x-y;}
// ...
double (*funcpointer)(double, double); // declare the function pointer
// it's a pointer to a function that returns a double and takes two doubles as arguments
// ...
if(input == "+") funcpointer = add; // set the function pointer (method #1)
else funcpointer = &subtract; // method #2
// ...
funcpointer(num1, num2); // call the function (method #1)
(*funcpointer)(num1, num2); // method #2