/ Vijos /

记录详情

Compile Error

foo.c:12:13: error: unknown type name 'Student'
   12 | int Compare(Student s1,Student s2);
      |             ^~~~~~~
foo.c:12:24: error: unknown type name 'Student'
   12 | int Compare(Student s1,Student s2);
      |                        ^~~~~~~
foo.c: In function 'main':
foo.c:26:5: warning: implicit declaration of function 'sort' [-Wimplicit-function-declaration]
   26 |     sort(student+1,student+n+1,Compare);
      |     ^~~~
foo.c:26:32: error: 'Compare' undeclared (first use in this function)
   26 |     sort(student+1,student+n+1,Compare);
      |                                ^~~~~~~
foo.c:26:32: note: each undeclared identifier is reported only once for each function it appears in
foo.c: At top level:
foo.c:33:13: error: unknown type name 'Student'
   33 | int Compare(Student s1,Student s2){
      |             ^~~~~~~
foo.c:33:24: error: unknown type name 'Student'
   33 | int Compare(Student s1,Student s2){
      |                        ^~~~~~~
foo.c: In function 'main':
foo.c:19:5: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   19 |     scanf("%d",&n);
      |     ^~~~~~~~~~~~~~
foo.c:22:9: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
   22 |         scanf("%d%d%d",&student[i].c_score,&student[i].m_score,&student[i].e_score);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1398 奖学金
语言
C
递交时间
2022-03-18 18:26:48
评测时间
2022-03-18 18:26:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes