Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:112:35: error: implicit conversion loses integer precision: 'int' to 'uint16_t' (aka 'unsigned short') [-Werror,-Wconversion]
    return abs((int)x1 - (int)x2) + abs((int)y1 - (int)y2);
    ~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
/in/sokoban.hpp:176:46: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            int moveOffset = movementOffsets[i];
                             ~~~~~~~~~~~~~~~ ^
/in/sokoban.hpp:179:74: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            std::string newPath = currentState.path + movementDirections[i];
                                                      ~~~~~~~~~~~~~~~~~~ ^
3 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 00:22:24
Judged At
2024-11-26 00:22:24
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes