Record Detail

Compile Error

/in/main.c: In function 'main':
/in/main.c:20:13: error: format '%d' expects argument of type 'int *', but argument 2 has type 'unsigned int *' [-Werror=format=]
     scanf("%d %d", &seed, &k);
            ~^      ~~~~~
            %d
/in/main.c:20:16: error: format '%d' expects argument of type 'int *', but argument 3 has type 'unsigned int *' [-Werror=format=]
     scanf("%d %d", &seed, &k);
               ~^          ~~
               %d
/in/main.c:30:13: error: unused variable 'rank' [-Werror=unused-variable]
         int rank;
             ^~~~
/in/main.c:29:14: error: unused variable 'name' [-Werror=unused-variable]
         char name[4];
              ^~~~
/in/main.c:20:5: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
     scanf("%d %d", &seed, &k);
     ^~~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:31:9: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
         scanf("%s %d", countries[i].name, &countries[i].rank);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Lab 5
Language
C
Submit At
2018-06-26 20:34:08
Judged At
2018-06-26 21:07:57
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes