labs-edaf30/lab2/dictionary.h
2024-11-20 19:11:48 +01:00

26 lines
462 B
C++

#ifndef DICTIONARY_H
#define DICTIONARY_H
#include "word.h"
#include <filesystem>
#include <string>
#include <vector>
#define MAXLEN 30
using std::vector;
using std::filesystem::path;
class Dictionary {
public:
Dictionary();
bool contains(const std::string &word) const;
std::vector<std::string> get_suggestions(const std::string &word) const;
int slurp(path p);
int spit(path p);
private:
vector<Word> words[MAXLEN];
};
#endif