记录详情

Compile Error

/in/foo.c: In function 'Insert':
/in/foo.c:11:2: error: 'else' without a previous 'if'
  else break;
  ^~~~
/in/foo.c:11:7: error: break statement not within loop or switch
  else break;
       ^~~~~
/in/foo.c: At top level:
/in/foo.c:13:1: error: expected identifier or '(' before 'return'
 return 0;
 ^~~~~~
/in/foo.c:14:1: error: expected identifier or '(' before '}' token
 }
 ^
/in/foo.c: In function 'main':
/in/foo.c:25:9: warning: passing argument 1 of 'Insert' makes pointer from integer without a cast [-Wint-conversion]
  Insert(x,a,n);
         ^
/in/foo.c:2:5: note: expected 'int *' but argument is of type 'int'
 int Insert(int a[],int n,int x)
     ^~~~~~
/in/foo.c:25:11: warning: passing argument 2 of 'Insert' makes integer from pointer without a cast [-Wint-conversion]
  Insert(x,a,n);
           ^
/in/foo.c:2:5: note: expected 'int' but argument is of type 'int *'
 int Insert(int a[],int n,int x)
     ^~~~~~
/in/foo.c: In function 'Insert':
/in/foo.c:12:1: warning: control reaches end of non-void function [-Wreturn-type]
 }
 ^

信息

递交者
类型
自测
题目
A7-5 数组的有序插入函数
语言
C
递交时间
2019-05-04 21:21:14
评测时间
2019-05-04 21:21:14
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes