Record Detail

Compile Error

In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In instantiation of 'bool HashTable<Key, Value, Hash, KeyEqual>::insert(const Key&, const Value&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/driver/main.cpp:111:43:   required from here
/in/hashtable.hpp:361:33: error: 'struct std::pair<const int, int>' has no member named 'insert_after'
             ((it.listItBefore)->insert_after(it));
              ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/in/hashtable.hpp: In instantiation of 'bool HashTable<Key, Value, Hash, KeyEqual>::erase(const Key&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/driver/main.cpp:120:35:   required from here
/in/hashtable.hpp:380:29: error: 'struct std::pair<const int, int>' has no member named 'erase_after'
         ((it.listItBefore)->erase_after(it));
          ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/in/hashtable.hpp: In instantiation of 'HashTable<Key, Value, Hash, KeyEqual>::Iterator HashTable<Key, Value, Hash, KeyEqual>::erase(const HashTable<Key, Value, Hash, KeyEqual>::Iterator&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/hashtable.hpp:459:18:   required from 'void HashTable<Key, Value, Hash, KeyEqual>::rehash(size_t) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; size_t = long unsigned int]'
/in/hashtable.hpp:432:27:   required from 'Value& HashTable<Key, Value, Hash, KeyEqual>::operator[](const Key&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]'
/in/driver/main.cpp:129:94:   required from here
/in/hashtable.hpp:408:29: error: 'struct std::pair<const int, int>' has no member named 'erase_after'
         ((it.listItBefore)->erase_after(it));
          ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~

Information

Submit By
Type
Submission
Homework
Project 2: Hashing
Language
C++
Submit At
2024-07-08 23:52:36
Judged At
2024-07-08 23:52:36
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes