Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:134:85: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            if (!is_within_bounds(new_px, new_py, rows, cols) || !is_walkable(grid, new_px, new_py)) {
                                                                  ~~~~~~~~~~~       ^~~~~~
/in/sokoban.hpp:134:93: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            if (!is_within_bounds(new_px, new_py, rows, cols) || !is_walkable(grid, new_px, new_py)) {
                                                                  ~~~~~~~~~~~               ^~~~~~
/in/sokoban.hpp:146:89: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                if (!is_within_bounds(new_bx, new_by, rows, cols) || !is_walkable(grid, new_bx, new_by)) {
                                                                      ~~~~~~~~~~~       ^~~~~~
/in/sokoban.hpp:146:97: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                if (!is_within_bounds(new_bx, new_by, rows, cols) || !is_walkable(grid, new_bx, new_by)) {
                                                                      ~~~~~~~~~~~               ^~~~~~
/in/sokoban.hpp:94:28: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                player_x = x;
                         ~ ^
/in/sokoban.hpp:95:28: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                player_y = y;
                         ~ ^
/in/sokoban.hpp:134:51: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
            if (!is_within_bounds(new_px, new_py, rows, cols) || !is_walkable(grid, new_px, new_py)) {
                 ~~~~~~~~~~~~~~~~                 ^~~~
/in/sokoban.hpp:134:57: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
            if (!is_within_bounds(new_px, new_py, rows, cols) || !is_walkable(grid, new_px, new_py)) {
                 ~~~~~~~~~~~~~~~~                       ^~~~
/in/sokoban.hpp:146:55: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                if (!is_within_bounds(new_bx, new_by, rows, cols) || !is_walkable(grid, new_bx, new_by)) {
                     ~~~~~~~~~~~~~~~~                 ^~~~
/in/sokoban.hpp:146:61: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                if (!is_within_bounds(new_bx, new_by, rows, cols) || !is_walkable(grid, new_bx, new_by)) {
                     ~~~~~~~~~~~~~~~~                       ^~~~
10 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 21:49:43
Judged At
2024-11-26 21:49:43
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes