title: What is a function type used for?
body: <p>Given the following two <code>typedef</code>s:</p>
  
  <pre><code>typedef void (*pftype)(int);
  
  typedef void ftype(int);
  </code></pre>
  
  <p>I understand that the first defines <code>pftype</code> as a pointer to a function that takes one <code>int</code> parameter and returns nothing, and the second defines <code>ftype</code> as a function type that takes one <code>int</code> parameter and returns nothing. I do not, however, understand what the second might be used for.</p>
  
  <p>I can create a function that matches these types:</p>
  
  <pre><code>void thefunc(int arg)
  {
      cout &lt;&lt; "called with " &lt;&lt; arg &lt;&lt; endl;
  }
  </code></pre>
  
  <p>and then I can create pointers to this function using each:</p>
  
  <pre><code>int main(int argc, char* argv[])
  {
      pftype pointer_one = thefunc;
      ftype *pointer_two = thefunc;
  
      pointer_one(1);
      pointer_two(2);
  }
  </code></pre>
  
  <p>When using the function type, I have to specify that I'm creating a pointer. Using the function pointer type, I do not. Either can be used interchangeably as a parameter type:</p>
  
  <pre><code>void run_a_thing_1(ftype pf)
  {
      pf(11);
  }
  
  void run_a_thing_2(pftype pf)
  {
      pf(12);
  }
  </code></pre>
  
  <p>What use, therefore, is the function type? Doesn't the function pointer type cover the cases, and do it more conveniently?</p>