Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:86:54: error: unused parameter 'boxes' [-Werror,-Wunused-parameter]
std::vector<std::pair<unsigned long, unsigned long>> boxes,std::vector<std::string> &grid){
                                                     ^
/in/sokoban.hpp:105:48: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
            unsigned long newx=x+directions[i].first;
                                ~~~~~~~~~~~~~~~^~~~~
/in/sokoban.hpp:105:45: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            unsigned long newx=x+directions[i].first;
                                 ~~~~~~~~~~ ^
/in/sokoban.hpp:106:48: error: implicit conversion changes signedness: 'const int' to 'unsigned long' [-Werror,-Wsign-conversion]
            unsigned long newy=y+directions[i].second;
                                ~~~~~~~~~~~~~~~^~~~~~
/in/sokoban.hpp:106:45: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            unsigned long newy=y+directions[i].second;
                                 ~~~~~~~~~~ ^
/in/sokoban.hpp:107:39: error: variable 'num' is uninitialized when used here [-Werror,-Wuninitialized]
            if(grid[newx][newy]=='#') num++;
                                      ^~~
/in/sokoban.hpp:103:16: note: initialize the variable 'num' to silence this warning
        int num;
               ^
                = 0
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-24 21:16:44
Judged At
2024-11-24 21:16:44
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes