Record Detail

Compile Error

/in/simulation.cpp: In function 'void InitGrid(const string&, world_t&)':
/in/simulation.cpp:213:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     for (int r = 0; r < height; ++r) {
                     ~~^~~~~~~~
/in/simulation.cpp:214:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int c = 0; c < width; ++c) {
                         ~~^~~~~~~
/in/simulation.cpp: In function 'void printOneRound(int, bool, world_t&)':
/in/simulation.cpp:559:22: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     for(int j = 0; j < world.numCreatures; j++){
                    ~~^~~~~~~~~~~~~~~~~~~~
/in/simulation.cpp: In function 'void printGrid(const grid_t&)':
/in/simulation.cpp:574:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     for (int r = 0; r < grid.height; ++r) {
                     ~~^~~~~~~~~~~~~
/in/simulation.cpp:575:27: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
         for (int c = 0; c < grid.width; ++c) {
                         ~~^~~~~~~~~~~~
/in/simulation.cpp:593:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
             if (c < grid.width) {
                 ~~^~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Project 3
Language
C++
Submit At
2024-11-14 23:42:18
Judged At
2024-11-14 23:42:18
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes