-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathHash2.h
More file actions
36 lines (29 loc) · 744 Bytes
/
Hash2.h
File metadata and controls
36 lines (29 loc) · 744 Bytes
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
33
34
35
36
////////////////////////////////////////////////////////////////////////
//Title: Hash2.h
//Author: Kristina Klinkner
//Date: March 20, 2002
//Description: Header file for Hash2.cpp
//
////////////////////////////////////////////////////////////////////////
#ifndef __HASH2_H
#define __HASH2_H
#define HASHSIZE2 19
#include "Common.h"
class HashTable2 {
private:
struct HashTable2Entry {
char* m_string;
int m_index;
HashTable2Entry* m_nextPtr;
};
HashTable2Entry* m_data[HASHSIZE2];
int Hash(ulong key);
ulong CreateKey(char* string);
public:
HashTable2();
~HashTable2();
void Insert(char* string, int index);
int WhichIndex(char* string);
void Print();
};
#endif