1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#include <pthread.h> #include <stdio.h> #include <windows.h> void * func(void * arg) { printf("Hello world\n"); return 0; } int main() { pthread_t t; pthread_create(&t, NULL, func, NULL); Sleep(5000); return 0; }