Pointers to Functions (C++)
<p>I am studying a C++ tutorial. I can't understand this example on Pointers to Functions.
Here it is:-</p>

<pre><code>// pointer to functions
#include &lt;iostream&gt;
using namespace std;

int addition (int a, int b)
{ return (a+b); }

int subtraction (int a, int b)
{ return (a-b); }

int operation (int x, int y, int (*functocall)(int,int))
{
  int g;
  g = (*functocall)(x,y);
  return (g);
}

int main ()
{
  int m,n;
  int (*minus)(int,int) = subtraction;

  m = operation (7, 5, addition);
  n = operation (20, m, minus);
  cout &lt;&lt;n;
  return 0;
}
</code></pre>

<p>The lines "<code>m = operation (7, 5, addition);</code>" and "<code>n = operation (20, m, minus);</code>" are treated the same way, but while minus has been declared as a pointer to function, addition hasn't. So, how did they both work the same way?</p>
