Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:417:58: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:417:93: 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[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:418:56: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:418:89: 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[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:429:58: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:429:93: 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[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:430:56: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:430:89: 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[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:441:58: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:441:93: 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[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:442:56: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:442:89: 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[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:453:58: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:453:93: 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[path[static_cast<size_t>(i)+1]->x][path[static_cast<size_t>(i)+1]->y] = 'B';
                    ~~~~                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:454:56: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
                    grid[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:454:89: 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[path[static_cast<size_t>(i)]->x][path[static_cast<size_t>(i)]->y] = '.';
                    ~~~~                                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
/in/sokoban.hpp:396:26: error: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
        for(int i = 0; i < matches[static_cast<size_t>(index_match)].indices.size(); ++i){
                       ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/sokoban.hpp:383:31: error: variable 'index_target' is uninitialized when used here [-Werror,-Wuninitialized]
        for(int index_target; index_target < num_targets; ++index_target){
                              ^~~~~~~~~~~~
/in/sokoban.hpp:383:29: note: initialize the variable 'index_target' to silence this warning
        for(int index_target; index_target < num_targets; ++index_target){
                            ^
                             = 0
18 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-24 17:49:47
Judged At
2024-11-24 17:49:47
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes