Esempio n. 1
0
File: test.cpp Progetto: juda/DS2014
void printHash(HashMap<K, V, H> h)
{
    typename HashMap<K, V, H>::Iterator itr = h.iterator();
    vector<typename HashMap<K, V, H>::Entry> v;
    while (itr.hasNext())
    {
        v.push_back(itr.next());
    }
    sort(v.begin(), v.end(), cmp<K, V, H>);
    for (int i = 0; i < v.size(); ++i)
    {
        cout << "(" << v[i].getKey() << ", " << v[i].getValue() << ")\t";
    }
    cout << endl;
    cout << "End print" << endl;
}