Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:114:60: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                state_str_.push_back(static_cast<char>(map[i][j]));
                                                       ~~~ ^
/in/sokoban.hpp:114:63: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                state_str_.push_back(static_cast<char>(map[i][j]));
                                                       ~~~    ^
/in/sokoban.hpp:136:64: 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]
        return static_cast<Cell>(state_str_[pos.row() * n_cols + pos.col()]);
                                 ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/in/sokoban.hpp:139:58: 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]
        return static_cast<Cell>(state_str_[row * n_cols + col]);
                                 ~~~~~~~~~~ ~~~~~~~~~~~~~^~~~~
/in/sokoban.hpp:142:39: 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]
        state_str_[pos.row() * n_cols + pos.col()] = static_cast<char>(type);
        ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/in/sokoban.hpp:234:42: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    map = std::vector<std::vector<Cell>>(n_rows, std::vector<Cell>(n_cols, Cell::Wall));
          ~~~                            ^~~~~~
/in/sokoban.hpp:234:68: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
    map = std::vector<std::vector<Cell>>(n_rows, std::vector<Cell>(n_cols, Cell::Wall));
                                                 ~~~               ^~~~~~
/in/sokoban.hpp:243:17: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            map[i][j] = static_cast<Cell>(c);
            ~~~ ^
/in/sokoban.hpp:243:20: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            map[i][j] = static_cast<Cell>(c);
            ~~~    ^
/in/sokoban.hpp:436:42: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            out << static_cast<char>(map[i][j]);
                                     ~~~ ^
/in/sokoban.hpp:436:45: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
            out << static_cast<char>(map[i][j]);
                                     ~~~    ^
/in/Compile/check.cpp:85:22: error: use of undeclared identifier 'print_answer'
        submit_ans = print_answer(index);
                     ^
/in/Compile/check.cpp:88:22: error: no matching function for call to 'solve'
        submit_ans = solve(grid_copy);
                     ^~~~~
/in/sokoban.hpp:386:13: note: candidate function not viable: requires 0 arguments, but 1 was provided
std::string solve() {
            ^
/in/sokoban.hpp:224:10: error: private field 'has_solution_' is not used [-Werror,-Wunused-private-field]
    bool has_solution_;
         ^
14 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-29 00:06:21
Judged At
2024-11-29 00:06:21
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes