Record Detail

Compile Error

/in/p3.cpp: In function 'int main(int, char**)':
/in/p3.cpp:38:13: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 if(lineCount>MAXSPECIES){
    ~~~~~~~~~^~~~~~~~~~~
/in/p3.cpp:85:18: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 if(instructionnum>MAXPROGRAM){
    ~~~~~~~~~~~~~~^~~~~~~~~~~
/in/p3.cpp:96:4: error: narrowing conversion of 'instructionnum' from 'int' to 'unsigned int' inside { } [-Werror=narrowing]
    };
    ^
/in/p3.cpp:111:15: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
  if(row<1||row>MAXHEIGHT){  
            ~~~^~~~~~~~~~
/in/p3.cpp:115:14: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
 if(col<1||col>MAXWIDTH){
           ~~~^~~~~~~~~
/in/p3.cpp:124:2: error: narrowing conversion of 'row' from 'int' to 'unsigned int' inside { } [-Werror=narrowing]
  } ;
  ^
/in/p3.cpp:124:2: error: narrowing conversion of 'col' from 'int' to 'unsigned int' inside { } [-Werror=narrowing]
/in/p3.cpp:176:19: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
  if(creaturenumber>MAXCREATURES){
     ~~~~~~~~~~~~~~^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Project 3
Language
C++
Submit At
2024-11-12 01:30:09
Judged At
2024-11-12 01:30:09
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes