Record Detail

Compile Error

In file included from /in/driver/main.cpp:5:0:
/in/hashtable.hpp: In member function 'size_t HashTable<Key, Value, Hash, KeyEqual>::findMinimumBucketSize(size_t) const':
/in/hashtable.hpp:181:20: error: expected primary-expression before 'i'
         fo (size_t i = 0; i <= HashPrime::num_distinct_sizes - 1; i++){
                    ^
/in/hashtable.hpp:181:27: error: 'i' was not declared in this scope
         fo (size_t i = 0; i <= HashPrime::num_distinct_sizes - 1; i++){
                           ^
/in/hashtable.hpp: In instantiation of 'size_t HashTable<Key, Value, Hash, KeyEqual>::findMinimumBucketSize(size_t) const [with Key = int; Value = int; Hash = std::hash<int>; KeyEqual = std::equal_to<int>; size_t = long unsigned int]':
/in/hashtable.hpp:404:43:   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:308:23:   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:327: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:180:16: error: unused variable 'full_size' [-Werror=unused-variable]
         size_t full_size = (size_t)floor((double)tableSize / maxLoadFactor);
                ^~~~~~~~~
/in/hashtable.hpp:178:41: error: unused parameter 'bucketSize' [-Werror=unused-parameter]
     size_t findMinimumBucketSize(size_t bucketSize) const {
                                         ^~~~~~~~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Project 2: Hashing
Language
C++
Submit At
2022-11-09 20:34:44
Judged At
2022-11-09 20:34:44
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes