problem passing listener class to a function
<p>I'm using a library that manipulates a binary search tree.  In this library is a function that traverses the tree and passes each node it finds to a callback class:</p>

<p><code>bool TCODBsp::traverseInvertedLevelOrder(ITCODBspCallback *callback, void *userData)</code></p>

<p><code>ITCODBspCallback</code> is a base class in the library from which the user is supposed to derive his own callback class to pass to the function.  Here is the base class:</p>

<pre><code>class ITCODBspCallback {
public :
    virtual bool visitNode(TCODBsp *node, void *userData) = 0;
};
</code></pre>

<p>Here's my derived class:</p>

<pre><code>class MyCallback: public ITCODBspCallback
{
    public:
        virtual bool visitNode(TCODBsp*, void*); // defined in my implementation file
};
</code></pre>

<p>I then pass <code>MyCallback</code> to the function like this:</p>

<p><code>bsp-&gt;traverseInvertedLevelOrder(new MyCallback(), NULL);</code></p>

<p>and g++ gives me the following errors:</p>

<p><code>expected type-specifier before 'MyCallback'<br>
expected ')' before 'MyCallback'<br>
no matching function for call to 'TCODBsp::traverseInvertedLevelOrder(int*, NULL)'<br>
note: candidates are: bool TCODBsp::traverseInvertedLevelOrder(ITCODBspCallback*, void*)</code></p>

<p>Anyone know what's wrong?  I'm curious why it thinks <code>MyCallback</code> is an <code>int*</code>, in particular.</p>
