Quote Originally Posted by pepsidrinker View Post
So setting the callback to , let's say:


Animation a1;
SetCallback(a1.Draw);
That should be:
Code:
Animation a1;
SetCallback(&Animation::Draw);
That would solve the "many instanciations" problem, wouldn't it ?
If the Draw function is static, it knows nothing about individual Animation object instances.
Code:
class Draw
{
    public:
         int x;  // non-static member
         static void Draw()
         {
            x = 1;  // error 
         }
};
The Draw() function, since it's static, cannot access x, since x only exists for Animation object instances, and there is no instance of an Animation object for static functions.
I guess my knowledge of how memory manage c++ classes is a bit rusty, but if you don't mind enlighting me on why a pointer to a non-static function in an INSTANCIATED object absolutely needs to be declared with the class scope, that would help me a lot.
I would have thought the link I gave you answered most, if not all questions concerning pointers to member functions.

Regards,

Paul McKenzie