I have assigned a function to an variable
p_samplen_->onData = onData;
PVOID onData(PVOID args) {
}
and it worked.
I tried to assign this variable to a function in class but it did not work.
p_samplen_->onData = &MyClass::onData;
PVOID MyClass::onData(PVOID args) {
}
the error is
test.cpp:32:48: error: assigning to 'startRoutine' (aka 'void *(*)(void *)') from incompatible type 'void *(MyClass::*)(void *)'
Please help me on this.