Record Detail

Compile Error

/in/main.c: In function 'main':
/in/main.c:31:12: error: variable 'NODE' set but not used [-Werror=unused-but-set-variable]
     node_t NODE[15];
            ^~~~
/in/main.c:21:12: error: variable 'rdm' set but not used [-Werror=unused-but-set-variable]
     double rdm[8];
            ^~~
/in/main.c:34:24: error: iteration 14 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
         NODE[i].country=&cty[i];
         ~~~~~~~~~~~~~~~^~~~~~~~
/in/main.c:33:5: note: within this loop
     for (int i=1;i<=16;i++){
     ^~~
/in/main.c:23:15: error: iteration 8 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
         rdm[i]=rand();
         ~~~~~~^~~~~~~
/in/main.c:22:5: note: within this loop
     for (int i=0;i<=8;i++){
     ^~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 5
Language
C
Submit At
2018-06-29 10:50:13
Judged At
2018-06-29 10:50:13
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes