I have a structure that looks like this:
Code:
struct STRUCTURE
{
bool (*ptFunction)(void);
};
So it has a pointer to a function in it (if that * is on the wrong side don't worry about it).
I also have a class like this:
Code:
class CONNECTION
{
public:
bool Assign();
bool MyPtrFunction(void);
};
I then want to do this:
Code:
bool CONNECTION::Assign()
{
STRUCTURE myStruct;
myStruct.ptFunction = MyPtrFunction;
}
But I can't do that because im assigning a
bool (__stdcall CONNECTION::*) (void) to a
bool (__stdcall *)(void).
Is there any possible way to assign the CONNECTION::MyPtrFunction to ptFunction? Any help is much appreciated!