私は VC2010 を使用しており、「__beginthreadex」をテストするために次のコードを記述します。
#include <process.h>
#include <iostream>
unsigned int __stdcall threadproc(void* lparam)
{
std::cout << "my thread" << std::endl;
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
unsigned uiThread1ID = 0;
uintptr_t th = _beginthreadex(NULL, 0, threadproc, NULL, 0, &uiThread1ID);
return 0;
}
しかし、コンソールには何も出力されません。コードの何が問題になっていますか?