Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:184:29: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    if(grid[newBoxY][newBoxX] == Wall || this->boxes.find(Coordinate(newBoxX, newBoxY)) != this->boxes.end()) continue;
                       ~~~~ ^~~~~~~
/in/sokoban.hpp:184:38: 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[newBoxY][newBoxX] == Wall || this->boxes.find(Coordinate(newBoxX, newBoxY)) != this->boxes.end()) continue;
                       ~~~~          ^~~~~~~
/in/sokoban.hpp:185:34: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    else if(grid[newBoxY][newBoxX] == TargetPosition) {
                            ~~~~ ^~~~~~~
/in/sokoban.hpp:185:43: 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]
                    else if(grid[newBoxY][newBoxX] == TargetPosition) {
                            ~~~~          ^~~~~~~
/in/sokoban.hpp:193:75: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                            Coordinate boxNeighbours(newBoxX + dPositions[j].x, newBoxY + dPositions[j].y);
                                                               ~~~~~~~~~~ ^
/in/sokoban.hpp:193:102: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                            Coordinate boxNeighbours(newBoxX + dPositions[j].x, newBoxY + dPositions[j].y);
                                                                                          ~~~~~~~~~~ ^
/in/sokoban.hpp:194:51: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                            if(grid[boxNeighbours.y][boxNeighbours.x] != Wall) {
                               ~~~~ ~~~~~~~~~~~~~~^
/in/sokoban.hpp:194:68: 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[boxNeighbours.y][boxNeighbours.x] != Wall) {
                               ~~~~                  ~~~~~~~~~~~~~~^
/in/sokoban.hpp:349:48: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
std::cout << "  neighbour at : " << neighbours[i].playerPosition.x << ", " << neighbours[i].playerPosition.y << std::endl;
                                    ~~~~~~~~~~ ^
/in/sokoban.hpp:349:90: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
std::cout << "  neighbour at : " << neighbours[i].playerPosition.x << ", " << neighbours[i].playerPosition.y << std::endl;
                                                                              ~~~~~~~~~~ ^
10 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-27 15:17:09
Judged At
2024-11-27 15:17:09
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes