How to have a function pointer inside a class?
<p>"error: invalid use of non-static data member ‘thread::tfun’"</p>

<pre><code>Class thread {

  typedef void* (th_fun) (void*);

  th_fun *tfun;

  void create(th_fun *fun=tfun) {

    pthread_create(&amp;t, NULL, fun, NULL);

}

}
</code></pre>

<p>How to have a function pointer inside a class?</p>

<p>Please note:- static deceleration will make the code compile. But my requirement is to hold the function per object.</p>
