pthread_create在qt下的使用错误
pthread_create(.. , ... , fun ,NULL);fun为一个类usr_window_ioctl的成员函数;但如果定义在里面,就出现下面错误:
usr_window_ioctl.cpp:77: 错误:cannot convert ‘void* (usr_window_ioctl::*)(void*)’ to ‘void* (*)(void*)’ for argument ‘3’ to ‘int pthread_create(pthread_t*, const pthread_attr_t*, void* (*)(void*), void*)’
意思是不是类中的成员函数不能作为pthread_create的参数,这种情况应该怎么办?(有的编译器在pthread_create里用&fun,不过有多了个 错误:ISO C++ 不允许通过提取)