CPP
cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include<iostream>
//#include<fileapi.h>
#include<pthread.h>
#include<windows.h>
#include<stdlib.h>
using namespace std;
#define thread_max 8
HANDLE FindFile;
WIN32_FIND_DATA FindFileData;
LPCWSTR file = L"D:\\VS-studio\\TEMP\\*.cpp";
void* ThreadSearch(void* args)
{
int current_thread = 0;
int num = current_thread++;
for (int i = num * (8 / 4);
i < ((num + 1) * (8 / 4)); i++)
{
FindFile = FindFirstFile(file, &FindFileData);
}
//return (void*)current_thread;
//pthread_exit(nullptr);
return;
}
Enter to Rename, Shift+Enter to Preview
OUTPUT
Run