실행 실패 (제출 코드 컴파일 에러)
Main.c: In function ‘compare’: Main.c:5:4: error: unknown type name ‘Person’ 5 | Person *p1 = (Person *)a; | ^~~~~~ Main.c:5:18: error: ‘Person’ undeclared (first use in this function) 5 | Person *p1 = (Person *)a; | ^~~~~~ Main.c:5:18: note: each undeclared identifier is reported only once for each function it appears in Main.c:5:26: error: expected expression before ‘)’ token 5 | Person *p1 = (Person *)a; | ^ Main.c:6:12: error: ‘p2’ undeclared (first use in this function); did you mean ‘p1’? 6 | Person *p2 = (Person *)b; | ^~ | p1 Main.c:6:26: error: expected expression before ‘)’ token 6 | Person *p2 = (Person *)b; | ^ Main.c:8:13: error: request for member ‘age’ in something not a structure or union 8 | return p1->age - p2->age; | ^~ Main.c:9:1: warning: control reaches end of non-void function [-Wreturn-type] 9 | } | ^ Main.c: In function ‘main’: Main.c:20:4: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 20 | scanf("%d", &N); | ^~~~~~~~~~~~~~~ Main.c:23:7: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 23 | scanf("%d %s", &p[i].age, p[i].name); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.