记录详情

Compile Error

/in/foo.c:13:5: error: conflicting types for 'a'
 int a (int x[], int n)
     ^
/in/foo.c:2:5: note: previous definition of 'a' was here
 int a (int n)
     ^
/in/foo.c: In function 'a':
/in/foo.c:17:17: warning: passing argument 1 of 'a' makes pointer from integer without a cast [-Wint-conversion]
         if ( a (x[j])==1) count++; 
                 ^
/in/foo.c:13:5: note: expected 'int *' but argument is of type 'int'
 int a (int x[], int n)
     ^
/in/foo.c:17:14: error: too few arguments to function 'a'
         if ( a (x[j])==1) count++; 
              ^
/in/foo.c:13:5: note: declared here
 int a (int x[], int n)
     ^
/in/foo.c: At top level:
/in/foo.c:20:1: warning: return type defaults to 'int' [-Wimplicit-int]
 main ()
 ^~~~
/in/foo.c: In function 'main':
/in/foo.c:22:18: warning: unused variable 'j' [-Wunused-variable]
     int x[10], i,j;
                  ^

信息

递交者
类型
递交
题目
A9-1 数组中的素数个数
语言
C
递交时间
2019-05-26 15:53:16
评测时间
2019-05-26 15:53:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes