Providing an instancabe class's method as a function pointer?
<p>Here is what I'd like to do. I have a function pointer which wants a function like this:</p>

<p>void func(int a);</p>

<p>so I have a class:</p>

<pre><code> class Foo {
    public:
    void func(int a);
    };

    Foo *foo = new Foo;

    something-&gt;setFunction(foo-&gt;func);
</code></pre>

<p>or in my case:</p>

<pre><code>testWidget[count] = new TestWidget;
            testWidget[count]-&gt;eventMouseClick.addHandler(testWidget[0]-&gt;silly);
</code></pre>

<p>But this gives me:</p>

<blockquote>
  <p>Error 5   error C3867:
  'TestWidget::silly': function call
  missing argument list; use
  '&amp;TestWidget::silly' to create a
  pointer to
  member    c:\users\josh\documents\visual
  studio
  2008\projects\agui\alleg_5\main.cpp   190</p>
</blockquote>

<p>Is there a way I could make this work without using a static function?</p>

<p>Thanks</p>
