title: c++ Function member pointer
body: <p>I have read several posts about this, but can't seem to find exactly what i am looking for with example code if anyone could give me some help i would highly appreciate it.</p>
  
  <p>in my header i have:</p>
  
  <pre><code>void addEvent(void (*func)(Pack  *));
  
  void triggerEvents(Pack * );
  
  std::list&lt;void(*)(Pack *)&gt; eventList;
  </code></pre>
  
  <p>and in cpp file</p>
  
  <pre><code>void DNetwork::addEvent(void (*func)(Pack *)){
      eventList.push_back(func);
  }
  
  void DNetwork::triggerEvents(Pack * pack){
      for (std::list&lt;void (*)( Pack *)&gt;::iterator it = eventList.begin(); it !=         eventList.end() ;it++ ){
          (*it)(pack);
      } 
  }
  </code></pre>
  
  <p>This works fine with free functions, but when i try to add a member function to this list i get an error. Does anyone know how to store a member function (from random class objects) inside a pointer?</p>