title: Storing function pointers
body: <p>The following uses a simple function pointer, but what if I want to store that function pointer?  In that case, what would the variable declaration look like?</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  double operation(double (*functocall)(double), double wsum);
  double get_unipolar(double);
  double get_bipolar(double);
  
  int main()
  {
      double k = operation(get_bipolar, 2); // how to store get_bipolar?
      cout &lt;&lt; k;
      return 0;
  }
  double operation(double (*functocall)(double), double wsum)
  {
      double g = (*functocall)(wsum);
      return g;
  }
  double get_unipolar(double wsum)
  {
      double threshold = 3;
      if (wsum &gt; threshold)
          return threshold;
      else
          return threshold;
  }
  double get_bipolar(double wsum)
  {
      double threshold = 4;
      if (wsum &gt; threshold)
          return threshold;
      else
          return threshold;
  }
  </code></pre>