#include #include #include using namespace std; #include // ========================================================================= const int DEFAULT_SIZE = 4096; class Dictionary { public: Dictionary(void) { InitArray(DEFAULT_SIZE); }; Dictionary(int Size) { InitArray(Size); }; ~Dictionary(); int& operator[](string key); void Delete(string key); int Length() { return count; }; void Print(); private: // data string *keys; int *values; int size; int count; int increment; // functions void InitArray(int Size); bool position(string key, int &pos); void ChangeSize(int size_change); }; // ------ private functions ------ void Dictionary::InitArray(int Size) { size = Size; count = 0; keys = new string[size]; values = new int[size]; increment = size/4>0 ? size/4 : 2; } bool Dictionary::position(string key, int &pos) { for(pos=0;pos remove it from the array for(int i=pos+1;i>word ) words[word]++; cout<