Record Detail

Compile Error

In file included from /in/Compile/check.cpp:6:
/in/sokoban.hpp:123:31: error: comparison of integers of different signs: 'std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::__cxx11::string>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >::mapped_type' (aka 'int') and 'size_t' (aka 'unsigned long') [-Werror,-Wsign-compare]
            visited[newState] > newCost) {
            ~~~~~~~~~~~~~~~~~ ^ ~~~~~~~
/in/sokoban.hpp:124:31: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'std::unordered_map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, std::hash<std::__cxx11::string>, std::equal_to<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::pair<const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int> > >::mapped_type' (aka 'int') [-Werror,-Wshorten-64-to-32]
          visited[newState] = newCost;
                            ~ ^~~~~~~
2 errors generated.
/in/Compile/Makefile:16: recipe for target 'main' failed
make: *** [main] Error 1

Information

Submit By
Type
Submission
Homework
Project3
Language
C++
Submit At
2024-11-20 18:40:50
Judged At
2024-11-20 18:40:50
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes