title: C++: array of pointers to functions
body: <p>Say we have 2 functions</p>
  <pre><code>foo() { cout &lt;&lt; &quot;Hello&quot;; }
  foo2() { cout &lt;&lt; &quot; wolrd!&quot;; }
  </code></pre>
  <p>how can i create an array of pointers (say <code>a</code>, <code>b</code>), with <code>a</code> pointing to <code>foo()</code> and <code>b</code> to <code>foo2()</code> ?
  my goal is to store these pointers in an array A, then loop over A to execute these functions.</p>