VS2010 中“HANDLE”: 未声明的标识符
#include <windows.h>
#include <iostream>
#include "stdafx.h"
using namespace std;
void main()
{
HANDLE hThread1;
hThread1=CreateThread(NULL,0,Fun1Proc,NULL,0,NULL);
CloseHandle(hThread1);
cout<<"main thread is running"<<endl;
}
DWORD WINAPI Fun1Proc(LPVOID laParameter)
{
cout<<"Thread1 is running "<<endl;
return 0;
}
error C2065: “HANDLE”: 未声明的标识符
error C2146: 语法错误: 缺少“;”(在标识符“hThread1”的前面)
error C2065: “hThread1”: 未声明的标识符
error C2065: “hThread1”: 未声明的标识符
error C2065: “Fun1Proc”: 未声明的标识符
请问各位该如何解决