-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
32 lines (29 loc) · 908 Bytes
/
main.cpp
File metadata and controls
32 lines (29 loc) · 908 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
#include <cstdlib>
#include <iostream>
#include <string>
using namespace std;
#include "tableHash.cpp"
int main(int argc, char* argv[]){
hashTable hash_table;
string name = "";
hash_table.AddItem("John", "The Art of War");
hash_table.AddItem("dan", "TWar");
hash_table.AddItem("ron", "Art War");
hash_table.AddItem("steve", "The War");
hash_table.AddItem("Jane", "of War");
hash_table.AddItem("Jack", "T War");
hash_table.AddItem("Bill", "The A War");
hash_table.AddItem("dustin", "The f War");
hash_table.AddItem("rick", "The Aro War");
// hash_table.PrintTable(); //prints out table on init level
// hash_table.PrintItems(7); //prints item that have collisions
while (name != "exit")
{
cout << " Search for ";
cin >> name;
if (name != "exit"){
hash_table.FindBook(name);
}
}
return 0;
}