Record Detail

Compile Error

/in/driver/main.cpp: In function 'int main(int, char**)':
/in/driver/main.cpp:139:31: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (Test.bucketSize() != hashTableSize){
             ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In instantiation of 'void HashTable<Key, Value, Hash, KeyEqual>::rehash(long long int) [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>]':
/in/hashtable.hpp:210: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:217: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:254:24: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         if (bucketSize == buckets.size()) return;
cc1plus: all warnings being treated as errors

Information

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