Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:160:81: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
            std::pair<size_t, size_t> nextPlayer = {(size_t)(currPlayer.first + currDir1), (size_t)(currPlayer.second + currDir2)};
                                                                              ~ ^~~~~~~~
/in/sokoban.hpp:160:121: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
            std::pair<size_t, size_t> nextPlayer = {(size_t)(currPlayer.first + currDir1), (size_t)(currPlayer.second + currDir2)};
                                                                                                                      ~ ^~~~~~~~
/in/sokoban.hpp:178:95: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
                        std::pair<size_t, size_t> pushedBox = {(size_t)(nextBoxPos[j].first + currDir1), (size_t)(nextBoxPos[j].second + currDir2)};
                                                                                            ~ ^~~~~~~~
/in/sokoban.hpp:178:138: error: implicit conversion changes signedness: 'int' to 'unsigned long' [-Werror,-Wsign-conversion]
                        std::pair<size_t, size_t> pushedBox = {(size_t)(nextBoxPos[j].first + currDir1), (size_t)(nextBoxPos[j].second + currDir2)};
                                                                                                                                       ~ ^~~~~~~~
4 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-24 21:40:30
Judged At
2024-11-24 21:40:30
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes