Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:27:17: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    grid.resize(rows);
         ~~~~~~ ^~~~
/in/sokoban.hpp:28:26: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
    for (size_t i = 0; i < rows; ++i)
                       ~ ^ ~~~~
/in/sokoban.hpp:54:41: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    size_t nx = i + dir.first;
                                  ~ ~~~~^~~~~
/in/sokoban.hpp:55:41: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    size_t ny = j + dir.second;
                                  ~ ~~~~^~~~~~
/in/sokoban.hpp:58:37: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                        x = x * dir.first;
                              ~ ~~~~^~~~~
/in/sokoban.hpp:59:37: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                        y = y * dir.second;
                              ~ ~~~~^~~~~~
/in/sokoban.hpp:78:41: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    size_t nx = i + dir.first;
                                  ~ ~~~~^~~~~
/in/sokoban.hpp:79:41: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    size_t ny = j + dir.second;
                                  ~ ~~~~^~~~~~
/in/sokoban.hpp:156:31: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        size_t nx = box.first + dir.first;
               ~~   ~~~~~~~~~~^~~~~~~~~~~
/in/sokoban.hpp:157:32: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        size_t ny = box.second + dir.second;
               ~~   ~~~~~~~~~~~^~~~~~~~~~~~
/in/sokoban.hpp:162:35: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            size_t rx = box.first - dir.first;
                   ~~   ~~~~~~~~~~^~~~~~~~~~~
/in/sokoban.hpp:163:36: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            size_t ry = box.second - dir.second;
                   ~~   ~~~~~~~~~~~^~~~~~~~~~~~
/in/sokoban.hpp:183:24: error: use of undeclared identifier 'INT_MAX'
        int min_dist = INT_MAX;
                       ^
/in/sokoban.hpp:247:52: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            int nx = current.player_x + DIRECTIONS[d].first;
                                        ~~~~~~~~~~ ^
/in/sokoban.hpp:248:52: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            int ny = current.player_y + DIRECTIONS[d].second;
                                        ~~~~~~~~~~ ^
/in/sokoban.hpp:249:33: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            if (!is_valid(grid, nx, ny))
                 ~~~~~~~~       ^~
/in/sokoban.hpp:249:37: error: implicit conversion changes signedness: 'int' to 'size_t' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            if (!is_valid(grid, nx, ny))
                 ~~~~~~~~           ^~
/in/sokoban.hpp:261:46: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                int box_nx = nx + DIRECTIONS[d].first;
                                  ~~~~~~~~~~ ^
/in/sokoban.hpp:262:46: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                int box_ny = ny + DIRECTIONS[d].second;
                                  ~~~~~~~~~~ ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 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-25 01:41:51
Judged At
2024-11-25 01:41:51
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes