title: What does "error: ’myfn’ declared as function returning a function" mean?
body: <p>I am trying to write a function that returns a function pointer.  Here is my minimal example:</p>
  
  <pre><code>void (*myfn)(int)()  // Doesn't work: supposed to be a function called myfn
  {                    // that returns a pointer to a function returning void
  }                    // and taking an int argument.
  </code></pre>
  
  <p>When I compile this with <code>g++ myfn.cpp</code> it prints this error:</p>
  
  <pre><code>myfn.cpp:1:19: error: ‘myfn’ declared as function returning a function
  myfn.cpp:1:19: warning: extended initializer lists only available with -std=c++11 or -std=gnu++11 [enabled by default]
  </code></pre>
  
  <p>Does this mean I am not allowed to return a function pointer?</p>