Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:194:16: error: comparison of integers of different signs: 'const size_t' (aka 'const unsigned long') and 'int' [-Werror,-Wsign-compare]
        if (dx == -1 && dy == 0)
            ~~ ^  ~~
/in/sokoban.hpp:212:28: error: comparison of integers of different signs: 'int' and 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
            while (right_x < grid[0].size() && !outGrid_orWall(right_x, box.second, grid))
                   ~~~~~~~ ^ ~~~~~~~~~~~~~~
/in/sokoban.hpp:260:27: error: comparison of integers of different signs: 'const size_t' (aka 'const unsigned long') and 'int' [-Werror,-Wsign-compare]
        if (dx == 0 && dy == -1)
                       ~~ ^  ~~
/in/sokoban.hpp:278:25: error: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
            while (up_y < grid.size() && !outGrid_orWall(up_y, box.first, grid))
                   ~~~~ ^ ~~~~~~~~~~~
/in/sokoban.hpp:408:115: error: implicit conversion changes signedness: 'int' to 'const size_t' (aka 'const unsigned long') [-Werror,-Wsign-conversion]
                if (isDeadlock(make_pair(potential_bx, potential_by), grid, target, moves[static_cast<size_t>(i)].first, moves[static_cast<size_t>(i)].second))
                    ~~~~~~~~~~                                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/in/sokoban.hpp:408:152: error: implicit conversion changes signedness: 'int' to 'const size_t' (aka 'const unsigned long') [-Werror,-Wsign-conversion]
                if (isDeadlock(make_pair(potential_bx, potential_by), grid, target, moves[static_cast<size_t>(i)].first, moves[static_cast<size_t>(i)].second))
                    ~~~~~~~~~~                                                                                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~
6 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 16:44:40
Judged At
2024-11-26 16:44:40
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes