title: C++ Function Pointer Array with unnamed functions
body: <p>I am attempting to make an array of function pointers.</p>
  
  <p>The array is going to be of quite a few functions (between 10 and 50 somewhere).</p>
  
  <p>This declaration is similar to the one I'm using:</p>
  
  <pre><code>int (*functions[15])(int, int);
  </code></pre>
  
  <p>The issue I am encountering is that I will have to define all of these functions by hand.  This is fine; however I do not care to give a name to all of them.</p>
  
  <p>None of the functions that will be in the array will be called from outside of the array.</p>
  
  <p>I know I'm pushing my luck with this question, but is there a way for me to put anonymous functions (similar to delegates, I suppose) into this array?</p>
  
  <p>or could I use a declaration similar to this:</p>
  
  <pre><code>int (*functions[15])(int, int);
  
  (*function[0])(int x, int y)
  {
      //stuff
  }
  
  (*function[1])(int x, int y)
  {
      //other stuff
  }
  </code></pre>
  
  <p>I hope to avoid using any C++11 with this, as well, if possible;  I understand a lot of improvements have been made with it, but I don't know if all compilers would support it yet (I intend on using multiple compilers across platforms).</p>
  
  <p>Is there a way to do this without naming every single function, or am I out of luck?</p>