Advertisement
rinab333

CSCI 340 assignment8.h

Jul 16th, 2017
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.54 KB | None | 0 0
  1. #ifndef ASSIGNMENT8_H
  2. #define ASSIGNMENT8_H
  3. #include <vector>
  4. #include <string>
  5.  
  6. struct Entry {
  7.     std::string key;
  8.     std::string description;
  9.    
  10.     Entry() { key = "---"; }
  11. };
  12.  
  13. class HT {
  14.     private:
  15.         std::vector<Entry>* hTable;
  16.         int table_size;
  17.         int item_count;
  18.         int hashing(const std::string&);
  19.     public:
  20.         HT(int size);
  21.         ~HT();
  22.         bool insert(const Entry&);
  23.         int search(const std::string&);
  24.         bool remove(const std::string&);
  25.         void print();
  26. };
  27.  
  28. #endif
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement