g12mcgov 0 Newbie Poster

Hello,

I'm a first timer here but I've kind of exhausted all my options for help on this program so this is my last resort...

Anyhow, I'm constructing a hash table given a hash table class header file from my textbook. I'm working on the Driver.cpp file and here's what's going on:

1) First I read in a text file called symbols.txt. This file is a combination of variables and numbers. (The file is shown below)
2) I then store these pairs of strings/ints as Symbols (part of my Symbol struct) in a vector of Symbol objects.
3) Then I insert these Symbol objects into my hash table.

But....

I'm getting pages long worth of error messages when I try to do so. And I have no idea why. Clearly my hashtable.insert() function takes in a referenced Object. And I'm passing in a Symbol object.

So would you guys mind helping me? I'd really appreciate it.

I've included the following files:

SeparateChaining.h
Driver.cpp
symbols.txt

and the error message from terminal.

p.s. the program contains some c++11 so if you wish to compile: g++ -std=c++0x Driver.cpp -o temp

/*

How-to Run:

    Compile via command line as such:

        g++ -std=c++0x Driver.cpp -o temp 

    Then to run:

        ./temp

    The "-std=c++0x" sets the compiler to handle C++11

*/

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#include <iostream>
#include <fstream>
#include <string>
#include <vector>
#include <string>
#include <time.h> 
#include <unistd.h>
#include "SeparateChaining.h" 

using namespace std;

struct Symbol
{
    int type;
    string name;
};

size_t hash(const string & key); //declaration of hashing function

int main()
{
    /************ VARS ***************/
    string line;
    int line_count;
    int table_size;

    /************ Vector of Symbols ***************/
    vector<Symbol> symbols;

    /************ HashTable of Symbols ***************/
    HashTable<Symbol> hashtable; //precomputed to have 101 elements --> probably will change this to accomodate table size.

    cout << "Opening file..." << endl;
    usleep(2000000);

    ifstream file;
    file.open("symbols.txt");

    if(!file)
    {
        cout << "System failed to open file.";
    }
    else
    {
        cout << "File successfully opened" << endl;
    }

    cout << "Please enter the table size for the Hash Table. (NOTE: It MUST be a prime number.)" << endl;
    cin >> table_size;

    for(Symbol temp; file >> temp.name >> temp.type;)
    {
        symbols.push_back(temp);
    }
    //Just to test and see if its loading it correctly...
    for(int i = 0; i < symbols.size(); i++)
    {
        cout << symbols[i].name << endl;
        cout << symbols[i].type << endl;
        hashtable.insert(symbols[i]); //PROBLEM IS HERE!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    }
}

size_t hash(const string & key )
{
    size_t hashVal = 0;

    for( char ch : key )
        hashVal = 37 * hashVal + ch;

    return hashVal;
}

SeparateChaining.h:

#ifndef SEPARATE_CHAINING_H
#define SEPARATE_CHAINING_H

#include <vector>
#include <list>
#include <string>
#include <algorithm>
#include <functional>
using namespace std;


int nextPrime( int n );

// SeparateChaining Hash table class
//
// CONSTRUCTION: an approximate initial size or default of 101
//
// ******************PUBLIC OPERATIONS*********************
// bool insert( x )       --> Insert x
// bool remove( x )       --> Remove x
// bool contains( x )     --> Return true if x is present
// void makeEmpty( )      --> Remove all items

template <typename HashedObj>
class HashTable
{
  public:
    explicit HashTable( int size = 101 ) : currentSize{ 0 }
      { theLists.resize( 101 ); }

    bool contains( const HashedObj & x ) const
    {
        auto & whichList = theLists[ myhash( x ) ];
        return find( begin( whichList ), end( whichList ), x ) != end( whichList );
    }

    void makeEmpty( )
    {
        for( auto & thisList : theLists )
            thisList.clear( );
    }

    bool insert( const HashedObj & x )
    {
        auto & whichList = theLists[ myhash( x ) ];
        if( find( begin( whichList ), end( whichList ), x ) != end( whichList) )
            return false;
        whichList.push_back( x );

            // Rehash; see Section 5.5
        if( ++currentSize > theLists.size( ) )
            rehash( );

        return true;
    }

    bool insert( HashedObj && x )
    {
        auto & whichList = theLists[ myhash( x ) ];      
        if( find( begin( whichList ), end( whichList ), x ) != end( whichList ) )
            return false;
        whichList.push_back( std::move( x ) );

            // Rehash; see Section 5.5
        if( ++currentSize > theLists.size( ) )
            rehash( );

        return true;
    }

    bool remove( const HashedObj & x )
    {
        auto & whichList = theLists[ myhash( x ) ];
        auto itr = find( begin( whichList ), end( whichList ), x );

        if( itr == end( whichList ) )
            return false;

        whichList.erase( itr );
        --currentSize;
        return true;
    }

  private:
    vector<list<HashedObj>> theLists;   // The array of Lists
    int  currentSize;

    void rehash( )
    {
        vector<list<HashedObj>> oldLists = theLists;

            // Create new double-sized, empty table
        theLists.resize( nextPrime( 2 * theLists.size( ) ) );
        for( auto & thisList : theLists )
            thisList.clear( );

            // Copy table over
        currentSize = 0;
        for( auto & thisList : oldLists )
            for( auto & x : thisList )
                insert( std::move( x ) );
    }

    size_t myhash( const HashedObj & x ) const
    {
        static hash<HashedObj> hf;
        return hf( x ) % theLists.size( );
    }
};

#endif

Symbols.txt:

    count
    2
    num
    2
    myFloat
    4
    myDouble
    5
    name
    6
    address
    6
    salary
    5
    gpa
    4
    gdp
    5
    pi
    5
    city
    6
    state
    6
    county
    6
    ch
    0
    ch2
    0
    ID
    1
    studentID
    1
    max
    3
    max2
    3
    greeting
    6
    debt
    5
    age
    2

Error Message:

In file included from /opt/local/include/gcc47/c++/bits/basic_string.h:3032:0,
                 from /opt/local/include/gcc47/c++/string:54,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/functional_hash.h: In instantiation of 'struct std::hash<Symbol>':
SeparateChaining.h:107:32:   required from 'size_t HashTable<HashedObj>::myhash(const HashedObj&) const [with HashedObj = Symbol; size_t = long unsigned int]'
SeparateChaining.h:46:50:   required from 'bool HashTable<HashedObj>::insert(const HashedObj&) [with HashedObj = Symbol]'
Driver.cpp:62:30:   required from here
/opt/local/include/gcc47/c++/bits/functional_hash.h:60:7: error: static assertion failed: std::hash is not specialized for this type
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h: In instantiation of '_InputIterator std::__find(_InputIterator, _InputIterator, const _Tp&, std::input_iterator_tag) [with _InputIterator = std::_List_iterator<Symbol>; _Tp = Symbol]':
/opt/local/include/gcc47/c++/bits/stl_algo.h:4466:45:   required from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = std::_List_iterator<Symbol>; _Tp = Symbol]'
SeparateChaining.h:47:9:   required from 'bool HashTable<HashedObj>::insert(const HashedObj&) [with HashedObj = Symbol]'
Driver.cpp:62:30:   required from here
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: error: no match for 'operator==' in '__first.std::_List_iterator<_Tp>::operator*<Symbol>() == __val'
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note: candidates are:
In file included from /opt/local/include/gcc47/c++/bits/stl_algo.h:68:0,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/functional:2382:5: note: template<class _Res, class ... _Args> bool std::operator==(std::nullptr_t, const std::function<_Res(_ArgTypes ...)>&)
/opt/local/include/gcc47/c++/functional:2382:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   cannot convert '__first.std::_List_iterator<_Tp>::operator*<Symbol>()' (type 'Symbol') to type 'std::nullptr_t'
In file included from /opt/local/include/gcc47/c++/bits/stl_algo.h:68:0,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/functional:2376:5: note: template<class _Res, class ... _Args> bool std::operator==(const std::function<_Res(_ArgTypes ...)>&, std::nullptr_t)
/opt/local/include/gcc47/c++/functional:2376:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::function<_Res(_ArgTypes ...)>'
In file included from /opt/local/include/gcc47/c++/functional:56:0,
                 from /opt/local/include/gcc47/c++/bits/stl_algo.h:68,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/tuple:797:5: note: template<class ... _TElements, class ... _UElements> bool std::operator==(const std::tuple<_Elements ...>&, const std::tuple<_Elements ...>&)
/opt/local/include/gcc47/c++/tuple:797:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::tuple<_Elements ...>'
In file included from /opt/local/include/gcc47/c++/random:51:0,
                 from /opt/local/include/gcc47/c++/bits/stl_algo.h:67,
                 from /opt/local/include/gcc47/c++/algorithm:63,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/random.tcc:1713:5: note: template<class _RealType1> bool std::operator==(const std::normal_distribution<_RealType>&, const std::normal_distribution<_RealType>&)
/opt/local/include/gcc47/c++/bits/random.tcc:1713:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::normal_distribution<_RealType>'
In file included from /opt/local/include/gcc47/c++/list:64:0,
                 from SeparateChaining.h:6,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_list.h:1574:5: note: template<class _Tp, class _Alloc> bool std::operator==(const std::list<_Tp, _Alloc>&, const std::list<_Tp, _Alloc>&)
/opt/local/include/gcc47/c++/bits/stl_list.h:1574:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::list<_Tp, _Alloc>'
In file included from /opt/local/include/gcc47/c++/list:64:0,
                 from SeparateChaining.h:6,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_list.h:277:5: note: template<class _Val> bool std::operator==(const std::_List_iterator<_Tp>&, const std::_List_const_iterator<_Val>&)
/opt/local/include/gcc47/c++/bits/stl_list.h:277:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::_List_iterator<_Tp>'
In file included from /opt/local/include/gcc47/c++/vector:65:0,
                 from Driver.cpp:4:
/opt/local/include/gcc47/c++/bits/stl_vector.h:1370:5: note: template<class _Tp, class _Alloc> bool std::operator==(const std::vector<_Tp, _Alloc>&, const std::vector<_Tp, _Alloc>&)
/opt/local/include/gcc47/c++/bits/stl_vector.h:1370:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::vector<_Tp, _Alloc>'
In file included from /opt/local/include/gcc47/c++/bits/locale_facets.h:50:0,
                 from /opt/local/include/gcc47/c++/bits/basic_ios.h:39,
                 from /opt/local/include/gcc47/c++/ios:45,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/streambuf_iterator.h:206:5: note: template<class _CharT, class _Traits> bool std::operator==(const std::istreambuf_iterator<_CharT, _Traits>&, const std::istreambuf_iterator<_CharT, _Traits>&)
/opt/local/include/gcc47/c++/bits/streambuf_iterator.h:206:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::istreambuf_iterator<_CharT, _Traits>'
In file included from /opt/local/include/gcc47/c++/string:54:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/basic_string.h:2516:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
/opt/local/include/gcc47/c++/bits/basic_string.h:2516:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
In file included from /opt/local/include/gcc47/c++/string:54:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/basic_string.h:2504:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
/opt/local/include/gcc47/c++/bits/basic_string.h:2504:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   mismatched types 'const _CharT*' and 'Symbol'
In file included from /opt/local/include/gcc47/c++/string:54:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/basic_string.h:2490:5: note: template<class _CharT> typename __gnu_cxx::__enable_if<std::__is_char<_Tp>::__value, bool>::__type std::operator==(const std::basic_string<_CharT>&, const std::basic_string<_CharT>&)
/opt/local/include/gcc47/c++/bits/basic_string.h:2490:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::basic_string<_CharT>'
In file included from /opt/local/include/gcc47/c++/string:54:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/basic_string.h:2483:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator==(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
/opt/local/include/gcc47/c++/bits/basic_string.h:2483:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::basic_string<_CharT, _Traits, _Alloc>'
In file included from /opt/local/include/gcc47/c++/string:43:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/allocator.h:124:5: note: template<class _Tp> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_CharT>&)
/opt/local/include/gcc47/c++/bits/allocator.h:124:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::allocator<_CharT>'
In file included from /opt/local/include/gcc47/c++/string:43:0,
                 from /opt/local/include/gcc47/c++/bits/locale_classes.h:42,
                 from /opt/local/include/gcc47/c++/bits/ios_base.h:43,
                 from /opt/local/include/gcc47/c++/ios:43,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/allocator.h:119:5: note: template<class _T1, class _T2> bool std::operator==(const std::allocator<_CharT>&, const std::allocator<_T2>&)
/opt/local/include/gcc47/c++/bits/allocator.h:119:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::allocator<_CharT>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1039:5: note: template<class _Iterator> bool std::operator==(const std::move_iterator<_Iterator>&, const std::move_iterator<_Iterator>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1039:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::move_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1033:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::move_iterator<_Iterator>&, const std::move_iterator<_IteratorR>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:1033:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::move_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:343:5: note: template<class _IteratorL, class _IteratorR> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_IteratorR>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:343:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::reverse_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:68:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_iterator.h:293:5: note: template<class _Iterator> bool std::operator==(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
/opt/local/include/gcc47/c++/bits/stl_iterator.h:293:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::reverse_iterator<_Iterator>'
In file included from /opt/local/include/gcc47/c++/bits/stl_algobase.h:65:0,
                 from /opt/local/include/gcc47/c++/bits/char_traits.h:41,
                 from /opt/local/include/gcc47/c++/ios:41,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/stl_pair.h:206:5: note: template<class _T1, class _T2> constexpr bool std::operator==(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
/opt/local/include/gcc47/c++/bits/stl_pair.h:206:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::pair<_T1, _T2>'
In file included from /opt/local/include/gcc47/c++/iosfwd:42:0,
                 from /opt/local/include/gcc47/c++/ios:39,
                 from /opt/local/include/gcc47/c++/ostream:40,
                 from /opt/local/include/gcc47/c++/iostream:40,
                 from Driver.cpp:1:
/opt/local/include/gcc47/c++/bits/postypes.h:218:5: note: template<class _StateT> bool std::operator==(const std::fpos<_StateT>&, const std::fpos<_StateT>&)
/opt/local/include/gcc47/c++/bits/postypes.h:218:5: note:   template argument deduction/substitution failed:
In file included from /opt/local/include/gcc47/c++/algorithm:63:0,
                 from SeparateChaining.h:8,
                 from Driver.cpp:8:
/opt/local/include/gcc47/c++/bits/stl_algo.h:135:7: note:   'Symbol' is not derived from 'const std::fpos<_StateT>'