title: function pointer error
body: <p>Can anybody help me with this simple code??</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  void testFunction(){
      cout&lt;&lt;"This is the test function 0"&lt;&lt;endl;
  }
  
  void testFunction1(){
      cout&lt;&lt;"This is the test function 1"&lt;&lt;endl;
  }
  
  void testFunction2(){
      cout&lt;&lt;"This is the test function 2"&lt;&lt;endl;
  }
  
  void (*fp[])()={testFunction,testFunction1,testFunction2};
  
  int main(){
  
      //fp=testFunction;
      (*fp[testFunction1])();
      //cout&lt;&lt;"Addrees of the function pointer is:"&lt;&lt;*fp;
  }
  </code></pre>
  
  <p>I am getting the following error:</p>
  
  <pre><code>error: invalid types `void (*[3])()[void ()()]' for array subscript|
  </code></pre>