こんにちは、これは私のコードです
#include "StdAfx.h"
#include <iostream>
#include <windows.h>
#include <process.h>
unsigned int __stdcall threadproc(void* lparam)
{
std::cout << "my thread" << std::endl;
return 0;
}
int main()
{
unsigned uiThread1ID = 0;
uintptr_t th = _beginthreadex(NULL, 0, threadproc, NULL, 0, &uiThread1ID);
WaitForSingleObject(th, INFINITE/*optional timeout, in ms*/);
return 0;
}
しかし、次のエラーメッセージが表示されます
エラー C2664: 'WaitForSingleObject': パラメーター 1 を 'uintptr_t' から 'HANDLE' に変換できません
誰か助けてくれませんか?