Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:279:25: error: comparison of integers of different signs: 'size_t' (aka 'unsigned long') and 'int' [-Werror,-Wsign-compare]
    for(size_t i = 0; i < row; i++) {
                      ~ ^ ~~~
/in/sokoban.hpp:371:46: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        if(grid[i][0] != Wall || grid[i][col - 1] != Wall) {
                                 ~~~~    ~~~~^~~
/in/sokoban.hpp:399:20: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        if(grid[0][i] != Wall || grid[row - 1][i] != Wall) {
           ~~~~    ^
/in/sokoban.hpp:399:43: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        if(grid[0][i] != Wall || grid[row - 1][i] != Wall) {
                                 ~~~~ ~~~~^~~
/in/sokoban.hpp:399:48: error: implicit conversion changes signedness: 'int' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        if(grid[0][i] != Wall || grid[row - 1][i] != Wall) {
                                 ~~~~          ^
/in/sokoban.hpp:379:97: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    if(startPosition.x == 0 && startPosition.y == 0) startPosition = Coordinate(j, i);
                                                                                     ~~~~~~~~~~ ^
/in/sokoban.hpp:379:100: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    if(startPosition.x == 0 && startPosition.y == 0) startPosition = Coordinate(j, i);
                                                                                     ~~~~~~~~~~    ^
/in/sokoban.hpp:382:55: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    targetPoints.push_back(Coordinate(j, i));
                                           ~~~~~~~~~~ ^
/in/sokoban.hpp:382:58: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    targetPoints.push_back(Coordinate(j, i));
                                           ~~~~~~~~~~    ^
/in/sokoban.hpp:385:46: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    boxes.emplace(Coordinate(j, i));
                                  ~~~~~~~~~~ ^
/in/sokoban.hpp:385:49: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    boxes.emplace(Coordinate(j, i));
                                  ~~~~~~~~~~    ^
/in/sokoban.hpp:388:46: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    boxes.emplace(Coordinate(j, i));
                                  ~~~~~~~~~~ ^
/in/sokoban.hpp:388:49: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    boxes.emplace(Coordinate(j, i));
                                  ~~~~~~~~~~    ^
/in/sokoban.hpp:389:55: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    targetPoints.push_back(Coordinate(j, i));
                                           ~~~~~~~~~~ ^
/in/sokoban.hpp:389:58: error: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
                    targetPoints.push_back(Coordinate(j, i));
                                           ~~~~~~~~~~    ^
15 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 18:29:01
Judged At
2024-11-26 18:29:01
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes