Record Detail

Compile Error

/in/ex5.c: In function 'main':
/in/ex5.c:45:49: error: invalid operands to binary > (have 'double (*)[20]' and 'double')
                 if(&patients.temperature[count] > 37.5){
                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/in/ex5.c:86:38: error: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Werror=format=]
                     printf("%d Age: %d Temp: %.1lf\n", id, &patients.age[index], patients.temperature[index]);
                                     ~^                     ~~~~~~~~~~~~~~~~~~~~
                                     %ls
/in/ex5.c:86:50: error: format '%lf' expects argument of type 'double', but argument 4 has type 'double *' [-Werror=format=]
                     printf("%d Age: %d Temp: %.1lf\n", id, &patients.age[index], patients.temperature[index]);
                                              ~~~~^                               ~~~~~~~~
/in/ex5.c:95:33: error: format '%d' expects argument of type 'int', but argument 3 has type 'int *' [-Werror=format=]
                     printf("%d %d %.1lf\n", patients.ID[i], &patients.age[i], patients.temperature[i]);
                                ~^                           ~~~~~~~~~~~~~~~~
                                %ls
/in/ex5.c:95:39: error: format '%lf' expects argument of type 'double', but argument 4 has type 'double *' [-Werror=format=]
                     printf("%d %d %.1lf\n", patients.ID[i], &patients.age[i], patients.temperature[i]);
                                   ~~~~^                                       ~~~~~~~~
cc1: all warnings being treated as errors

Information

Submit By
Type
Submission
Homework
Homework 5
Language
C
Submit At
2021-07-11 18:06:35
Judged At
2021-07-16 13:50:47
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes