Hi,
I'm using a c-library in my c++ project.
Therefore I've to call this c-function:
Code:
int rm_init(int id, char* ip, unsigned short port, int timeout,
callaback_fnc);
the signatures of the callback function is:
Code:
void callback_fnc(int, int, int, char*)
I want to use a class member as the callback-function and the call
shall be done in the ctor of the same class:
Code:
struct C
{
void cb(int id, int cmd, int len, char* data);
C()
{
....
}
};
how would I call rm_init() from C() and give the member funtions
(C::cb()) instead a c-funtion to it?
I guess I need some bind or mem_fun magic, but Im not shure about ist.
Thank you in advance!