Record Detail

Compile Error

/in/main.c: In function 'main':
/in/main.c:36:9: error: writing into constant object (argument 2) [-Werror=format=]
         scanf("%s","%d",&country[i].name,&country[i].rank);
         ^~~~~
/in/main.c:36:15: error: too many arguments for format [-Werror=format-extra-args]
         scanf("%s","%d",&country[i].name,&country[i].rank);
               ^~~~
/in/main.c:32:5: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
     scanf("%d,%d", &seed,&k);
     ^~~~~~~~~~~~~~~~~~~~~~~~
/in/main.c:36:9: error: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Werror=unused-result]
         scanf("%s","%d",&country[i].name,&country[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:50:02
Judged At
2018-06-26 21:08:00
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes