OAIP/threads/main.c

15 lines
236 B
C
Raw Normal View History

2024-11-10 13:45:07 +04:00
#include <stdio.h>
#include <stdlib.h>
#include <threads.h>
void thrd_func(int* i) {
printf_s("%d\n", *i);
}
int main() {
thrd_t* threads[10];
for (int i = 0; i < 10; i++) {
thrd_create(threads[i], thrd_func, &i);
}
return 0;
}