Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:25:36: error: implicit conversion changes signedness: 'char' to 'unsigned long' [-Werror,-Wsign-conversion]
                hash = hash * 31 + c;
                                 ~ ^
/in/sokoban.hpp:39:17: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
           grid[x][y] != '#';
           ~~~~ ^
/in/sokoban.hpp:39: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]
           grid[x][y] != '#';
           ~~~~    ^
/in/sokoban.hpp:51:23: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    if (isTarget(grid[x][y])) return false;
                 ~~~~ ^
/in/sokoban.hpp:51:26: 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 (isTarget(grid[x][y])) return false;
                 ~~~~    ^
/in/sokoban.hpp:53:51: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    bool wallUp = !isValid(grid, x-1, y) || grid[x-1][y] == '#';
                                            ~~~~ ~^~
/in/sokoban.hpp:53:55: 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]
    bool wallUp = !isValid(grid, x-1, y) || grid[x-1][y] == '#';
                                            ~~~~      ^
/in/sokoban.hpp:54:53: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    bool wallDown = !isValid(grid, x+1, y) || grid[x+1][y] == '#';
                                              ~~~~ ~^~
/in/sokoban.hpp:54:57: 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]
    bool wallDown = !isValid(grid, x+1, y) || grid[x+1][y] == '#';
                                              ~~~~      ^
/in/sokoban.hpp:55:52: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    bool wallLeft = !isValid(grid, x, y-1) || grid[x][y-1] == '#';
                                              ~~~~ ^
/in/sokoban.hpp:55:56: 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]
    bool wallLeft = !isValid(grid, x, y-1) || grid[x][y-1] == '#';
                                              ~~~~    ~^~
/in/sokoban.hpp:56:53: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    bool wallRight = !isValid(grid, x, y+1) || grid[x][y+1] == '#';
                                               ~~~~ ^
/in/sokoban.hpp:56:57: 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]
    bool wallRight = !isValid(grid, x, y+1) || grid[x][y+1] == '#';
                                               ~~~~    ~^~
/in/sokoban.hpp:75:17: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    grid.resize(rows);
         ~~~~~~ ^~~~
/in/sokoban.hpp:79:37: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        std::getline(std::cin, grid[i]);
                               ~~~~ ^
/in/sokoban.hpp:125:36: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            if (isBox(current.grid[newX][newY])) {
                      ~~~~~~~      ^~~~
/in/sokoban.hpp:125:42: 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 (isBox(current.grid[newX][newY])) {
                      ~~~~~~~            ^~~~
/in/sokoban.hpp:130:40: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    isBox(current.grid[boxNewX][boxNewY])) {
                          ~~~~~~~      ^~~~~~~
/in/sokoban.hpp:130:49: 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]
                    isBox(current.grid[boxNewX][boxNewY])) {
                          ~~~~~~~               ^~~~~~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 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 18:12:58
Judged At
2024-11-27 18:12:58
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes