I wanted some help trying to create a callback function with C++. Below is a header file and I would like to make test_callback () a callback function, but do not know where to begin. Can you please advise?
#ifndef FOO_H_
#define FOO_H_
typedefstruct {
int data1;
int data2;
char data3;
double data4;
} MyData;
class Foo
{
public:
Foo ();
~Foo ();
// i want to make this function into a callback
void test_callback (MyData *data);
};
#endif /* FOO_H_ */