17 lines
380 B
C++
17 lines
380 B
C++
#include "dict.hpp"
|
|
|
|
std::unordered_set<std::string> word_dict;
|
|
|
|
void load_file() {
|
|
std::ifstream file("resources/google-10000-english-usa-no-swears.txt");
|
|
if (file.is_open()) {
|
|
std::string line;
|
|
while (std::getline(file, line)) {
|
|
// using printf() in all tests for consistency
|
|
//printf("%s", line.c_str());
|
|
word_dict.insert(line.c_str());
|
|
}
|
|
file.close();
|
|
}
|
|
}
|