记录详情

Compile Error

/in/foo.c: In function 'main':
/in/foo.c:12:25: error: subscripted value is neither array nor pointer nor vector
   12 |         scanf("%d", &arr[i]);
      |                         ^
/in/foo.c:18:28: error: subscripted value is neither array nor pointer nor vector
   18 |         scanf("%d", &insert[i]);
      |                            ^
/in/foo.c:25:16: error: subscripted value is neither array nor pointer nor vector
   25 |         if (arr[i] <= insert[j]) {
      |                ^
/in/foo.c:25:29: error: subscripted value is neither array nor pointer nor vector
   25 |         if (arr[i] <= insert[j]) {
      |                             ^
/in/foo.c:26:19: error: subscripted value is neither array nor pointer nor vector
   26 |             result[k++] = arr[i++];
      |                   ^
/in/foo.c:26:30: error: subscripted value is neither array nor pointer nor vector
   26 |             result[k++] = arr[i++];
      |                              ^
/in/foo.c:28:19: error: subscripted value is neither array nor pointer nor vector
   28 |             result[k++] = insert[j++];
      |                   ^
/in/foo.c:28:33: error: subscripted value is neither array nor pointer nor vector
   28 |             result[k++] = insert[j++];
      |                                 ^
/in/foo.c:33:15: error: subscripted value is neither array nor pointer nor vector
   33 |         result[k++] = arr[i++];
      |               ^
/in/foo.c:33:26: error: subscripted value is neither array nor pointer nor vector
   33 |         result[k++] = arr[i++];
      |                          ^
/in/foo.c:37:15: error: subscripted value is neither array nor pointer nor vector
   37 |         result[k++] = insert[j++];
      |               ^
/in/foo.c:37:29: error: subscripted value is neither array nor pointer nor vector
   37 |         result[k++] = insert[j++];
      |                             ^
/in/foo.c:42:29: error: subscripted value is neither array nor pointer nor vector
   42 |         printf("%d ", result[i]);
      |                             ^
/in/foo.c:23:9: warning: variable 'result' set but not used [-Wunused-but-set-variable]
   23 |     int result;
      |         ^~~~~~
/in/foo.c:6:9: warning: variable 'insert' set but not used [-Wunused-but-set-variable]
    6 |     int insert; // 插入的元素,最多10个
      |         ^~~~~~
/in/foo.c:5:9: warning: variable 'arr' set but not used [-Wunused-but-set-variable]
    5 |     int arr; // 原数组,最多20个元素 + 最多10个插入元素
      |         ^~~

信息

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