CreateThread
#include <windows.h>DWORD WINAPI t_func(PVOID args){ printf("Threaded Write\n"); return 0;}int _tmain(int argc, _TCHAR* argv[]){ HANDLE Threads[5]; printf("Bacon\n"); for(int i=0; i<5; i++) Threads[i] = CreateThread(NULL, 0, t_func, NULL, 0, NULL); WaitForMultipleObjects(5, Threads, true, INFINITE); return 0;}Output: Bacon Threaded Write Threaded Write Threaded Write Threaded Write Threaded Write
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)