Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:290:50: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[1].first == box.first && currPlayer.second + dir[1].second == box.second) 
                                        ~ ~~~~~~~^~~~~
/in/sokoban.hpp:290:99: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[1].first == box.first && currPlayer.second + dir[1].second == box.second) 
                                                                                         ~ ~~~~~~~^~~~~~
/in/sokoban.hpp:298:50: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[0].first == box.first && currPlayer.second + dir[0].second == box.second) 
                                        ~ ~~~~~~~^~~~~
/in/sokoban.hpp:298:99: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[0].first == box.first && currPlayer.second + dir[0].second == box.second) 
                                                                                         ~ ~~~~~~~^~~~~~
/in/sokoban.hpp:307:50: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[2].first == box.first && currPlayer.second + dir[2].second == box.second) 
                                        ~ ~~~~~~~^~~~~
/in/sokoban.hpp:307:99: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[2].first == box.first && currPlayer.second + dir[2].second == box.second) 
                                                                                         ~ ~~~~~~~^~~~~~
/in/sokoban.hpp:316:50: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[3].first == box.first && currPlayer.second + dir[3].second == box.second) 
                                        ~ ~~~~~~~^~~~~
/in/sokoban.hpp:316:99: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
                    if(currPlayer.first + dir[3].first == box.first && currPlayer.second + dir[3].second == box.second) 
                                                                                         ~ ~~~~~~~^~~~~~
/in/sokoban.hpp:241:9: error: unused variable 'justPushed' [-Werror,-Wunused-variable]
    int justPushed = 0;
        ^
9 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 23:30:00
Judged At
2024-11-25 23:30:00
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes