A
alexl
hi,
is this possible? should print "it worked.."
if so, what do I do in my "cplusplusbind" function?
typedef void(*ptf)();
class Hello {
void caller(){
ptf =cplusplusbind(this, m_callback);
..
call_fun_indirectly(ptf);
}
void m_callback () {
cout << "it worked!\n";
}
};
int main(int argc, char* argv[])
{
Hello h;
h.caller();
return 0;
}
ptf cplusplusbind (class T, T::*) {
return (/* do magic */ );
}
is this possible? should print "it worked.."
if so, what do I do in my "cplusplusbind" function?
typedef void(*ptf)();
class Hello {
void caller(){
ptf =cplusplusbind(this, m_callback);
..
call_fun_indirectly(ptf);
}
void m_callback () {
cout << "it worked!\n";
}
};
int main(int argc, char* argv[])
{
Hello h;
h.caller();
return 0;
}
ptf cplusplusbind (class T, T::*) {
return (/* do magic */ );
}