#include <windows.h>
#include <IOSTREAM.H>
DWORD WINAPI FuncProc1( LPVOID lpParameter//thread data
);
int index = 0;
int main()
{
HANDLE hThread1;
hThread1 = CreateThread(NULL,
0,
FuncProc1,
NULL,
0,
NULL);
CloseHandle(hThread1);
while (index++ < 1000)
{
cout << "main thread is running" << endl;
}
return 0 ;
}
DWORD WINAPI FuncProc1(LPVOID lpParameter //thread data
)
{
while(index++ < 1000)
{
cout << "thread1 is running" << endl;
}
return 0;
};