I have some trouble with assigning a callback function-pointer to member function. I have a callback function-pointer like this:
void (*callback)(float arg);
And my class looks like this:
class EXAMPLE_CLASS
{
public:
/*
* Standard Constructor
*/
EXAMPLE_CLASS();
/*
* Standard Destructor
*/
virtual ~EXAMPLE_CLASS();
void test_callback(float arg)
{
y = arg;
}
private:
float y;
};
I want now to assign this callback function-pointer to the member callback function, how can I achieve this?
Edit I want to achieve something like this now:
EXAMPLE_CLASS obj;
callback = obj.test_callback;