// MultiThread.cpp : Defines the entry point for the console application.
//
#include <windows.h>
#include <iostream>
using namespace std;
DWORD WINAPI Fun1Proc(
LPVOID lpParameter // thread data
);
void main()
{
HANDLE hThread1;
hThread1=CreateThread(NULL,0,Fun1Proc,NULL,0,NULL);
CloseHandle(hThread1);
Sleep(10);
cout<<"main thread is running"<<endl;
}
DWORD WINAPI Fun1Proc(
LPVOID lpParameter // thread data
)
{
cout<<"thread1 is running"<<endl;
return 0;
}
multithread(1)
最新推荐文章于 2024-01-06 13:22:04 发布