-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
38 lines (31 loc) · 1.25 KB
/
main.cpp
File metadata and controls
38 lines (31 loc) · 1.25 KB
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
37
38
#include <iostream>
#include "ArrayMap.h"
using namespace std;
int main(int argc, char **argv) {
ArrayMap *arrayMap = new ArrayMap();
arrayMap->put("hello", 5);
arrayMap->put("helol", 10);
arrayMap->put("Corey", 20);
arrayMap->put("dog", 25);
arrayMap->put("tac", 30);
arrayMap->put("trac", 35);
arrayMap->put("mak", 45);
arrayMap->put("tackle", 50);
arrayMap->put("hack", 55);
cout << "Successfully put all of words!" << endl;
cout << "Result: " << arrayMap->get("hello") << endl;
cout << "Result: " << arrayMap->get("helol") << endl;
cout << "Should not be found: " << arrayMap->get("cat") << endl;
cout << "Result: " << arrayMap->get("dog") << endl;
cout << "Result: " << arrayMap->get("tac") << endl;
cout << "Result: " << arrayMap->get("trac") << endl;
cout << "Result: " << arrayMap->get("mak") << endl;
cout << "Result: " << arrayMap->get("tackle") << endl;
cout << "Result: " << arrayMap->get("hack") << endl;
cout << "Successfullly got all words!" << endl;
cout << "Get: " << arrayMap->get("helol") << endl;
cout << "Remove: " << arrayMap->remove("helol") << endl;
cout << "After remove: " << arrayMap->get("helol") << endl;
// arrayMap->printContent();
return 0;
}