Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:78:78: error: implicit conversion changes signedness: 'short' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            pos new_player = {static_cast<short>(cur_player.row + directions[d].first), static_cast<short>(cur_player.col + directions[d].second)};
                                                                  ~~~~~~~~~~ ^
/in/sokoban.hpp:78:136: error: implicit conversion changes signedness: 'short' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            pos new_player = {static_cast<short>(cur_player.row + directions[d].first), static_cast<short>(cur_player.col + directions[d].second)};
                                                                                                                            ~~~~~~~~~~ ^
/in/sokoban.hpp:87:76: error: implicit conversion changes signedness: 'short' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    pos new_box = {static_cast<short>(box.row + directions[d].first) , static_cast<short>(box.col + directions[d].second)};
                                                                ~~~~~~~~~~ ^
/in/sokoban.hpp:87:128: error: implicit conversion changes signedness: 'short' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    pos new_box = {static_cast<short>(box.row + directions[d].first) , static_cast<short>(box.col + directions[d].second)};
                                                                                                                    ~~~~~~~~~~ ^
/in/sokoban.hpp:102:68: error: implicit conversion changes signedness: 'short' to 'std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            bfsqueue.push({new_player, new_boxes, path + dir_chars[d]});
                                                         ~~~~~~~~~ ^
5 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-23 14:49:42
Judged At
2024-11-23 14:49:42
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes