#include "stdafx.h"
class Test
{
private:
UINT TId;
public:
Test()
{
CloseHandle( (HANDLE)_beginthreadex(NULL,NULL,TestThread,NULL,NULL,&TId) );
}
UINT __stdcall TestThread(LPVOID N)
{
return printf("Hello World");
}
};
int main()
{
delete new Test();
Sleep(100);
}
이렇게 했을때 스레드 메서드를 static으로 선언하지 않고 포인터를 만들어서 하는 방법이 있나요?
|