#include <iostream>




char callable(int parameter)
{
  std::cout << "Function callable has been called with value " <<
    parameter << std::endl;

  return '@';
}


int main()
{
  /*
   * Method 1: call explicitly by pointer call
   */
  char (*pointer2function)(int) = callable;

  char result = (*pointer2function) (42);
  std::cout << "Result: " << result << std::endl;

  /*
   * Method 2: create new type and call the function like we normally would
   */
  typedef char (*p2f)(int);
  p2f functionpointer = callable;
  result = functionpointer(42);
  std::cout << "Result: " << result << std::endl;

}

