Record Detail

Compile Error

/in/main.c: In function 'main':
/in/main.c:23:17: error: format '%s' expects argument of type 'char *', but argument 2 has type 'char (*)[4]' [-Werror=format=]
         scanf("%s %d",&a[i].name,&a[i].rank);
                 ^
/in/main.c:32:20: error: variable 'b' set but not used [-Werror=unused-but-set-variable]
             node_t b[i];
                    ^
/in/main.c:38:20: error: variable 'b' set but not used [-Werror=unused-but-set-variable]
             node_t b[i];
                    ^
/in/main.c:59:22: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
             b[i].left=&a[i];
                      ^
/in/main.c:60:23: error: assignment from incompatible pointer type [-Werror=incompatible-pointer-types]
             b[i].right=&a[2*i+1];
                       ^
/in/main.c:57:20: error: variable 'b' set but not used [-Werror=unused-but-set-variable]
             node_t b[i];
                    ^
/in/main.c:58:26: error: array subscript is above array bounds [-Werror=array-bounds]
             b[i].country=&a[2*i+1];
                          ^~~~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 5
Language
C
Submit At
2018-06-25 20:36:25
Judged At
2018-06-25 20:36:25
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes