-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
27 lines (20 loc) · 693 Bytes
/
main.cpp
File metadata and controls
27 lines (20 loc) · 693 Bytes
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
#include <iostream>
#include <fstream>
#include <sstream>
#include <vector>
#include "DataFilter.h"
int main() {
const char LINE_DELIM{'\n'};
const std::streamsize MAX_LINE_SIZE{std::numeric_limits<std::streamsize>::max()};
const std::string DELIM_BEFORE{"\n"};
const std::string DELIM_AFTER{"Civil War (Union)"};
const std::string INPUT_FILE{"./input_converted_file.txt"};
DataFilter df(INPUT_FILE, DELIM_AFTER);
std::vector<std::string> names = df.filter_by_delimiter();
for (auto name : names) {
std::cout << name << std::endl;
}
std::cout << std::endl;
std::cout << "Entries count: " << names.size() << std::endl;
return 0;
}