64,678
社区成员
发帖
与我相关
我的任务
分享
#include <windows.h>
#include <iostream>
using namespace std;
DWORD WINAPI Fun1Proc(LPVOID lpParameter);
void main(void)
{
HANDLE hThread1;
hThread1 = CreateThread(NULL, 0, Fun1Proc, NULL, 0, NULL);
CloseHandle(hThread1);
cout << "main thread is running" << endl;
Sleep(1000);
}
DWORD WINAPI Fun1Proc(LPVOID lpParameter)
{
cout << "thread1 is running" << endl;
return 0;
}