I try to call a function which passed as function pointer with no argument, but I can't make it work.
void *disconnectFunc;
void D::setDisconnectFunc(void (*func)){
disconnectFunc = func;
}
void D::disconnected(){
*disconnectFunc;
connected = false;
}
See Question&Answers more detail:os