Original Post
Okay, this is likely a repost, but it's an important topic, and one that is a huge stumbling block for me.
I have a class (It's name is Class_A in this post ) that needs to callback to a member function of another class (Class_B), like so:
The function in Class_B needs to have access to both Class_A and Class_B (which means I can't just use static for the Class_B func)
My question is: What is the best way of going about this? I'd like to have it so I don't have to modify Class_B in any specific way to 'fit' Class_A, if possible. Class_A is a COM object, if that helps...
I have a class (It's name is Class_A in this post ) that needs to callback to a member function of another class (Class_B), like so:
void Class_A::member_function()
{
... //do stuff
this->pointer_to_Class_B_function(this);
}
The function in Class_B needs to have access to both Class_A and Class_B (which means I can't just use static for the Class_B func)
My question is: What is the best way of going about this? I'd like to have it so I don't have to modify Class_B in any specific way to 'fit' Class_A, if possible. Class_A is a COM object, if that helps...