// main4.cpp, fourth file of a number in mp3pieces project // By RPF 5/25/2000 // Here, we'll start using the hash table, with the world's // most trivial hash function -- everything hashes to 0 (zero). #include "mp3Header.h" void main() { HashTable* hash1 = new HashTable(); cout << "triv hash should be zero: " << hash1->hash(47) << "\n"; // what's in an item in the hash array itself? cout << "contents of list[3]: " << hash1->arrayH[3]->length << " " << hash1->arrayH[3]->head << "\n"; Node* node1 = new Node(1792503, "odd planet_zorg"); Node* node2 = new Node(2, "very even planet"); hash1->insertH(node1); // hash1->insertH(node2); cout << "length inside the list: " << hash1->arrayH[0]->length << "\n"; // reach in and print items attached to 0, then to 1; cout << "Should be two nodes:\n"; hash1->arrayH[0]->print(); cout << "Should be no nodes:\n"; hash1->arrayH[1]->print(); // to end run and close console window. cout << "\nDon't forget to enter an int when done.\n"; int i; cin >> i; }