Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:62:71: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    return abs(static_cast<int>(a.first) - static_cast<int>(b.first)) +
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:112:29: error: implicit conversion changes signedness: 'std::tuple_element<0, const std::pair<int, int> >::type' (aka 'const int') to 'unsigned long' [-Werror,-Wsign-conversion]
            size_t nx = x + dx, ny = y + dy;
                          ~ ^~
/in/sokoban.hpp:112:42: error: implicit conversion changes signedness: 'std::tuple_element<1, const std::pair<int, int> >::type' (aka 'const int') to 'unsigned long' [-Werror,-Wsign-conversion]
            size_t nx = x + dx, ny = y + dy;
                                       ~ ^~
/in/sokoban.hpp:204:62: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
            auto next_player = make_pair(curr.player.first + dx, curr.player.second + dy);
                                                           ~ ^~
/in/sokoban.hpp:204:87: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
            auto next_player = make_pair(curr.player.first + dx, curr.player.second + dy);
                                                                                    ~ ^~
/in/sokoban.hpp:216:58: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    auto new_box = make_pair(box.first + dx, box.second + dy);
                                                       ~ ^~
/in/sokoban.hpp:216:75: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    auto new_box = make_pair(box.first + dx, box.second + dy);
                                                                        ~ ^~
7 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-26 01:30:06
Judged At
2024-11-26 01:30:06
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes