Record Detail

Compile Error

/in/ex4.cpp: In function 'int main()':
/in/ex4.cpp:60:37: error: variable 'attack_order' set but not used [-Werror=unused-but-set-variable]
     int group1_type=0,group2_type=0,attack_order,current_number_1,current_number_2;//0 for elves, 1 for human, 2 for hobbits;
                                     ^~~~~~~~~~~~
/in/ex4.cpp:99:50: error: 'current_number_1' may be used uninitialized in this function [-Werror=maybe-uninitialized]
     while(current_number_1<group_num[group1_type]&&current_number_2<group_num[group2_type]){
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/in/ex4.cpp:99:50: error: 'current_number_2' may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1plus: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Final Exam
Language
C++
Submit At
2020-08-07 17:54:27
Judged At
2020-08-09 18:17:37
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes