DWORD WINAPI StartThread(LPVOID threadID)
{
int tid = atoi((char *)threadID);
cout<
}
int main()
{
HANDLE hThread1;
DWORD dwGenericThread;
char threadID[10];
for (int x = 0; x < 10; ++x)
{
for (int y = 0; y < 10; ++y)
{
sprintf(threadID, "%d", y*10+x);
hThread1 = CreateThread(NULL,0,StartThread,&threadID,0,&dwGenericThread);
if(hThread1 == NULL)
{
DWORD dwError = GetLastError();
cout<<"SCM:Error in Creating thread"<
}
WaitForSingleObject(hThread1,INFINITE);
CloseHandle(hThread1);
}
}
}