Homework/HW05/HashTable.cc
void HashTable::print()
{
    ListIter iter;
    int i;
    
    cout << "The table has " << numObjects << " objects." << endl;
    if (numObjects) 
    {
        cout << "Here are the objects:" << endl;
        for (i=0; i<capacity; i++)
            if (storage[i].size()) 
                // traverse the list at index i
                for (iter=storage[i].begin(); iter!=storage[i].end(); ++iter)
                    cout << *iter << endl;
    }
}
// Prints all the objects in the table.
Prints all the objects in the table.
Prints all the objects in the table .
void HashTable::print()
{
    ListIter iter;
    int i;
    cout << "The table has " << numObjects << " objects." << endl;
    if (numObjects) 
    {
        cout << "Here are the objects:" << endl;
        for (i=0; i<capacity; i++)
            if (storage[i].size()) 
                for (iter=storage[i].begin(); iter!=storage[i].end(); ++iter)
                    cout << *iter << endl;
    }
}
void HashTable :: print ( ) { ListIter iter ; int i ; cout << " " << numObjects << " " << endl ; if ( numObjects ) { cout << " " << endl ; for ( i = 0 ; i < capacity ; i ++ ) if ( storage [ i ] . size ( ) ) for ( iter = storage [ i ] . begin ( ) ; iter != storage [ i ] . end ( ) ; ++ iter ) cout << * iter << endl ; } }
Prints all the objects in the table.
Prints all the objects in the table .
// traverse the list at index i