Record Detail

Compile Error

In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In member function 'HashTable<Key, Value, Hash, KeyEqual>::Iterator HashTable<Key, Value, Hash, KeyEqual>::find(const Key&)':
/in/hashtable.hpp:232:28: error: 'it' was not declared in this scope
             if (keyEqual((*it).first,key)){
                            ^~
/in/hashtable.hpp:232:28: note: suggested alternative: 'int'
             if (keyEqual((*it).first,key)){
                            ^~
                            int
/in/hashtable.hpp:233:28: error: redeclaration of 'HashTable<Key, Value, Hash, KeyEqual>::Iterator it'
                 Iterator it(this, buckets.begin() + index, itBefore);
                            ^
/in/hashtable.hpp:232:28: note: '<typeprefixerror>it' previously declared here
             if (keyEqual((*it).first,key)){
                            ^~

Information

Submit By
Type
Submission
Homework
Project 2: Hashing
Language
C++
Submit At
2024-11-11 22:43:53
Judged At
2024-11-11 22:43:53
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes