-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdict.h
32 lines (29 loc) · 880 Bytes
/
dict.h
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
32
#include <sstream>
#include <stdlib.h>
#include <iostream>
#include <iterator>
#include <vector>
#include <cstring>
#include <sstream>
#include <fstream>
using namespace std;
/* Some of the methods and variables needed not completed */
class Dict {
private:
int size;
int wordLength;
vector<string> wrds;
string displayWord;
vector<string>::iterator it;
public:
Dict(int wordLength0); //1
void getWords(); //2
bool checkForRepeat(string s); //just after 2
void reduceWords(string s);//reduces the amount of words in vector relevant //3
int findFreq(string s);//find the freq for reducing //just after 3
int largest(int nums[]);//find the pos with the most //just after find freq before reduce
int reduceDisplay(string s, int p); //just after findfreq
bool checkDict(string s); //4
string sample();//give a sample //5
void printWord(); //last
};