createthread api 在 c++ 要调用哪个头文件
一下代码编译时出错:#include<cstdlib>#include<iostream>#defineWIN32_LEAN_AND_MEAN#include<windo...
一下代码编译时出错:#include <cstdlib>#include <iostream>#define WIN32_LEAN_AND_MEAN#include <windows.h>#include <winbase.h>using namespace std;
DWORD WINAPI ThreadsTest(LPVOID);
int main(){ HANDLE hTreads1; HANDLE hTreads2; DWORD dwThreadID1; DWORD dwThreadID2; hTreads1=CreateTread( 0, ThreadsTest, (LPVOID)1, &dwThreadID1 ); sleep(1000); system("PAUSE"); return EXIT_SUCCESS;}
23 G:\Users\Administrator\Desktop\新建文件夹\main.cpp `CreateTread' undeclared (first use this function) 展开
DWORD WINAPI ThreadsTest(LPVOID);
int main(){ HANDLE hTreads1; HANDLE hTreads2; DWORD dwThreadID1; DWORD dwThreadID2; hTreads1=CreateTread( 0, ThreadsTest, (LPVOID)1, &dwThreadID1 ); sleep(1000); system("PAUSE"); return EXIT_SUCCESS;}
23 G:\Users\Administrator\Desktop\新建文件夹\main.cpp `CreateTread' undeclared (first use this function) 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询