title: C++ Pointer to Dynamic Array of functions?
body: <p>I've created an array of pointer to functions, I want to know Is it possible to create array of pointer dynamically, as you see in below I want to change array length dynamically which currently is 2.</p>
  
  <pre><code>#include &lt;iostream&gt;
  using std::cout;
  using std::cin;
  using std::endl;
  
  void func1(int);
  void func2(int);
  
  int main()
  {
      void (*func[2])(int) = { &amp;func1, &amp;func2 };
  
      func[0](10);
      func[1](20);
  
      cin.ignore();
      return 0;
  }
  
  void func1(int n)
  {
      cout &lt;&lt; "In func1()\n\tThe value is: " &lt;&lt; n &lt;&lt; endl;
  }
  
  void func2(int n)
  {
      cout &lt;&lt; "In func2()\n\tThe value is: " &lt;&lt; n &lt;&lt; endl;
  }
  </code></pre>