-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (25 loc) · 1.01 KB
/
Copy pathmain.cpp
File metadata and controls
32 lines (25 loc) · 1.01 KB
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
29
30
31
#include "processing_files .h"
int main() {
//Храним все страны в одном векторе
vector<Country*> AllCountries;
vector<vector<int>> Lines;
//Ввод папки с файлами
string pathToDirectory;
cout << "Please, enter the path to your folder" << endl;
cin >> pathToDirectory;
//Формирование вектора с путями к файлам указанной папки
vector<string> pathsToFiles;
for (const auto & entry : fs::directory_iterator(pathToDirectory)) {
pathsToFiles.push_back(entry.path().string());
}
cout << "=========================" << endl;
//Обработка каждого файла папки
for (int i = 0; i < pathsToFiles.size(); ++i) {
cout << pathsToFiles[i] << endl;
processTheFile(pathsToFiles[i], AllCountries, Lines);
}
countingScores(AllCountries, Lines);
sortTheVector(AllCountries);
outputTheResult(pathToDirectory, AllCountries);
return 0;
}