#include using std::cin; using std::cerr; #include "hash.h" int main() { HashTable htable(5); string word; while( cin>>word ) { HashTable::entry_ptr p = htable.Find( word ); if ( p ) { // p->second ++ ; htable[word] ++ ; } else if ( ! htable.Insert( word, 1 ) ) { cerr << "Insert failed!!\n"; return 1; } } htable.PrintTable(); vector::exported_type> v; htable.ToVector(v); cout << "\nContents:\n"; for ( int i=0; i