Code
#include "stdafx.h"
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>
DWORD WINAPI ThreadWork(LPVOID num)
{
printf("%d\n",num);
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
DWORD dwThreadID[5];
HANDLE threadhandle=CreateThread(NULL,
0,
ThreadWork,
(LPVOID)2,//传递的参数
0,
&dwThreadID[0]);
getchar();
return 0;
}