아래는 코드입니다.
int CThread::Run(void)
{
if(pthread_create(&mtid, NULL, &do_it, NULL) != 0)
{
cout << "pthread_create error" << endl;
}
return(0);
}
void* CThread::do_it(void* arg)
{
while(1)
{
sleep(1);
cout << "....." << endl;
}
return;
}
아래는 에러 메시지 입니다.
[code:1]"CThread.cc", line 38: Error: Formal argument 3 of type extern "C" void*(*)(void*) in call to pthread_create(unsigned*, const _pthread_attr*, extern "C" void*(*)(void*), void*) is being passed void*(CThread::*)(void*).