Use derived class's static method as function callback in C++
<p>I need to pass an object's static method as callback function using following code:</p>

<pre><code>glutDisplayFunc(callback)
</code></pre>

<p>Where <code>callback</code> is a static method of some class - <code>baseClass::callback()</code>. It compiles fine. But now I want to have a derived class <em>(having <code>baseClass</code> as it's parent)</em> having the same callback function - that is, I want to overwrite the callback function.</p>

<p>I've overwritten it in derivedClass but <code>derivedClass::callback()</code> is not getting called.</p>

<p>PS. I'm calling <code>glutDisplayFunc(callback)</code> withing the base class. Code looks like:</p>

<pre><code>baseClass::someFunction(){
    glutDisplayFunc(callback);
}
</code></pre>

<p>How do I pass <code>derivedClass::callback</code> instead of <code>baseClass::callback</code> withing a method of <code>baseClass?</code> All methods are static.</p>
