Record Detail

Compile Error

In file included from /in/Compile/check.cpp:7:
/in/sokoban.hpp:361:27: error: implicit conversion changes signedness: 'int' to 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-conversion]
        std::cout << grid[i] << std::endl;
                     ~~~~ ^
/in/sokoban.hpp:359:19: error: comparison of integers of different signs: 'int' and 'std::vector::size_type' (aka 'unsigned long') [-Werror,-Wsign-compare]
    for (int i; i < grid.size(); ++i)
                ~ ^ ~~~~~~~~~~~
/in/sokoban.hpp:359:17: error: variable 'i' is uninitialized when used here [-Werror,-Wuninitialized]
    for (int i; i < grid.size(); ++i)
                ^
/in/sokoban.hpp:359:15: note: initialize the variable 'i' to silence this warning
    for (int i; i < grid.size(); ++i)
              ^
               = 0
3 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 09:52:42
Judged At
2024-11-29 09:52:42
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes