记录详情

Compile Error

/in/foo.c:3:17: error: 'n' undeclared here (not in a function)
    3 | void add(char a[n])
      |                 ^
/in/foo.c: In function 'add':
/in/foo.c:5:23: error: 'n' undeclared (first use in this function)
    5 |     for (int i = 0; i<n-1; i++)
      |                       ^
/in/foo.c:5:23: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c: In function 'main':
/in/foo.c:21:12: error: 'n' undeclared (first use in this function)
   21 |     char a[n];
      |            ^
/in/foo.c:27:9: error: type of formal parameter 1 is incomplete
   27 |     add(a);
      |         ^
/in/foo.c:21:10: warning: unused variable 'a' [-Wunused-variable]
   21 |     char a[n];
      |          ^

信息

递交者
类型
自测
语言
C
递交时间
2025-12-06 10:31:57
评测时间
2025-12-06 10:31:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes