ヘッダーと.cpp定義ファイルを含むpthreadを含むクラスを作成しています。
.hiには:
class test
{
public:
int a;
...
private:
typedef void (*myfunc)(void *p);
static myfunc pthreadRun;
}
.cppで私は持っています:
...
typedef void (*myfunc)(void *p);
myfunc test::pthreadRun
{
this->a = 10;
pthread_exit(NULL);
}
...
エラーが発生します:void (* test::pthreadRun)(void*)
はの静的メンバーではなく、class test
他のエラーもたくさんありますが、これは最初のエラーです。
静的と宣言されているので混乱しています:/
pthreadRun
のスレッド実行関数ですpthread_create()
私は何が欠けていますか?