L
Levin Alexander
Hi,
(I hope that this is not a FAQ)
I'm trying to make a timer call a method of an object.
void MyClass::myCallback(int par)
{cout << "Callback Called" << std::endl;}
void MyClass::addTimer()
{
signal(SIGALRM, myCallback);
// ...
}
This does not work. The Error is
"argument of type 'void (MyClass:(int)' does not match 'void (*)(int)'"
Why is that not working? Is there a workaround?
Thanks,
Levin
(I hope that this is not a FAQ)
I'm trying to make a timer call a method of an object.
void MyClass::myCallback(int par)
{cout << "Callback Called" << std::endl;}
void MyClass::addTimer()
{
signal(SIGALRM, myCallback);
// ...
}
This does not work. The Error is
"argument of type 'void (MyClass:(int)' does not match 'void (*)(int)'"
Why is that not working? Is there a workaround?
Thanks,
Levin