title: pass the class method as pthread start function
body: <p>Considering the following class</p>
  
  <pre><code>class Foo
  {
      public:
          void* func(void* arg)
          {
              // how to pass this function to pthread...?!
          }
  }
  </code></pre>
  
  <p>Later I want to pass <code>func()</code> to <code>pthread_create()</code>, instead of a function:</p>
  
  <pre><code>int main()
  {
      char * msg = "Hi dude";
      Foo * ins = new Foo();
      pthread_t pt;
      // how to pass ins-&gt;func instead of a function?
      pthread_create( &amp;pt, NULL, ins-&gt;func, (void*)msg );
  }
  </code></pre>
  
  <p>Thanks in advance.</p>