Record Detail

Compile Error

In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In member function 'void HashTable<Key, Value, Hash, KeyEqual>::rehash(size_t)':
/in/hashtable.hpp:400:31: error: 'it' was not declared in this scope
             for (auto& pair : it) {
                               ^~
/in/hashtable.hpp:400:31: note: suggested alternative: 'i'
             for (auto& pair : it) {
                               ^~
                               i
/in/hashtable.hpp:410:29: error: 'j' was not declared in this scope
             insert(newTable[j].first,newTable[j].second);
                             ^
/in/hashtable.hpp:410:29: note: suggested alternative: 'jn'
             insert(newTable[j].first,newTable[j].second);
                             ^
                             jn
/in/hashtable.hpp: In instantiation of '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:304:19:   required from 'bool HashTable<Key, Value, Hash, KeyEqual>::insert(const HashTable<Key, Value, Hash, KeyEqual>::Iterator&, const Key&, const Value&) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]'
/in/hashtable.hpp:322:22:   required from '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:398:16: error: unused variable 'newSize' [-Werror=unused-variable]
         size_t newSize=tableSize;
                ^~~~~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Project 2: Hashing
Language
C++
Submit At
2024-11-08 16:41:05
Judged At
2024-11-08 16:41:05
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes