I want to stop the warning
server.cpp:823: warning: converting from 'void* (ClientHandler::)()' to 'void ()(void)'
in the call:
pthread_create(th, NULL,
(void* (*)(void*)) &ClientHandler::handle,
(void *) clientHandler);
where handle()
is a member function of ClientHandler
:
void* ClientHandler::handle();
I have difficulties deciphering the function-type message from the compiler.
The question is:
- Should I change the
handle()
interface? Can I get rid of casting overall?
- Should I change the cast? To what exactly?
- Something completely different?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…