记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:20:5: warning: 'main' is normally a non-static function [-Wmain]
   20 | int main() {
      |     ^~~~
/in/foo.c: In function 'main':
/in/foo.c:21:12: error: 'n' undeclared (first use in this function)
   21 |     int a1[n], a2[n], a3[n];
      |            ^
/in/foo.c:21:12: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:38:9: error: 'cout' undeclared (first use in this function)
   38 |         cout<<"\n"<<endl;
      |         ^~~~
/in/foo.c:38:21: error: 'endl' undeclared (first use in this function)
   38 |         cout<<"\n"<<endl;
      |                     ^~~~
/in/foo.c:23:25: warning: unused variable 'merged2' [-Wunused-variable]
   23 |     int merged1[n * 2], merged2[n * 2];
      |                         ^~~~~~~
/in/foo.c:23:9: warning: unused variable 'merged1' [-Wunused-variable]
   23 |     int merged1[n * 2], merged2[n * 2];
      |         ^~~~~~~
/in/foo.c:21:23: warning: unused variable 'a3' [-Wunused-variable]
   21 |     int a1[n], a2[n], a3[n];
      |                       ^~
/in/foo.c:21:16: warning: unused variable 'a2' [-Wunused-variable]
   21 |     int a1[n], a2[n], a3[n];
      |                ^~
/in/foo.c:21:9: warning: unused variable 'a1' [-Wunused-variable]
   21 |     int a1[n], a2[n], a3[n];
      |         ^~
/in/foo.c: In function 'main':
/in/foo.c:45:1: error: expected declaration or statement at end of input
   45 | }
      | ^
/in/foo.c: At top level:
/in/foo.c:20:5: warning: 'main' defined but not used [-Wunused-function]
   20 | int main() {
      |     ^~~~

信息

递交者
类型
递交
题目
A10-1 有序数组的合并
比赛
2025年春 南师大《程序设计与竞赛》作业赛第三场
语言
C
递交时间
2025-03-22 20:47:16
评测时间
2025-03-22 20:47:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes