Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:113: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:113: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:135: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:138: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:141: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:233: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:233: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:242: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:242: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:435: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:435: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:385:13: note: candidate function not viable: requires 0 arguments, but 1 was provided
std::string solve() {
            ^
/in/sokoban.hpp:223: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-28 20:59:25
Judged At
2024-11-28 20:59:25
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes