我有以下问题:我有一个带有这些方法的类(还有更多但并不重要):
class SocketServer
{
//pointer to function
SocketServer(int port) {}
int Start(void (*receptor)(char *, int));
}
class SampleGrabberCallback
{
SocketServer *socket;
SocketServer() {
socket = new Socket(1111);
socket->start(&(this::receive_sink)); <---------- my problem
}
void receive_sink(char *buffer, int len);
}
带箭头的线不起作用。Start 方法创建一个新线程并保持