title: Function pointer to non-static function
body: <p>I'm trying to make an array of function pointers to alleviate some code that would otherwise be nightmarish. I want to use a set of functions like the one that follows.</p>
  
  <pre><code>void drawNothing(Point2, Point2, Point2, Point2);
  </code></pre>
  
  <p>I have defined a type for the function pointers.</p>
  
  <pre><code>typedef void(*FunctionPointer)(Point2, Point2, Point2, Point2);
  </code></pre>
  
  <p>And an array to store the pointers themselves.</p>
  
  <pre><code>FunctionPointer drawMSCase[16];
  </code></pre>
  
  <p>The problem is that when I try to assign a function to one of the slots, like so</p>
  
  <pre><code>drawMSCase[0] = &amp;Grid::drawNothing;
  </code></pre>
  
  <p>I get the following error</p>
  
  <pre><code> error: cannot convert 'void (Grid::*)(Point2, Point2, Point2, Point2)' to 'Grid::FunctionPointer {aka void (*)(Point2, Point2, Point2, Point2)}' in assignment
  </code></pre>
  
  <p>It works if I define the function as static, but I can't really do that for it would have too big an impact on my design. How can I solve this?</p>