/ Vijos /

记录详情

Compile Error

/in/foo.c:3:14: warning: data definition has no type or storage class
 int a[10005];b[10005],k,aa[10005],bb[10005],gg,a2[10005];
              ^
/in/foo.c:3:14: warning: type defaults to 'int' in declaration of 'b' [-Wimplicit-int]
/in/foo.c:3:23: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
 int a[10005];b[10005],k,aa[10005],bb[10005],gg,a2[10005];
                       ^
/in/foo.c:3:25: warning: type defaults to 'int' in declaration of 'aa' [-Wimplicit-int]
 int a[10005];b[10005],k,aa[10005],bb[10005],gg,a2[10005];
                         ^~
/in/foo.c:3:35: warning: type defaults to 'int' in declaration of 'bb' [-Wimplicit-int]
 int a[10005];b[10005],k,aa[10005],bb[10005],gg,a2[10005];
                                   ^~
/in/foo.c:3:45: warning: type defaults to 'int' in declaration of 'gg' [-Wimplicit-int]
 int a[10005];b[10005],k,aa[10005],bb[10005],gg,a2[10005];
                                             ^~
/in/foo.c:3:48: warning: type defaults to 'int' in declaration of 'a2' [-Wimplicit-int]
 int a[10005];b[10005],k,aa[10005],bb[10005],gg,a2[10005];
                                                ^~
/in/foo.c: In function 'chu':
/in/foo.c:108:10: warning: passing argument 1 of 'strcpy' from incompatible pointer type [-Wincompatible-pointer-types]
   strcpy(a2,aa,sizeof(aa));
          ^~
In file included from /in/foo.c:2:0:
/usr/include/string.h:125:14: note: expected 'char * restrict' but argument is of type 'int *'
 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/foo.c:108:13: warning: passing argument 2 of 'strcpy' from incompatible pointer type [-Wincompatible-pointer-types]
   strcpy(a2,aa,sizeof(aa));
             ^~
In file included from /in/foo.c:2:0:
/usr/include/string.h:125:14: note: expected 'const char * restrict' but argument is of type 'int *'
 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~
/in/foo.c:108:3: error: too many arguments to function 'strcpy'
   strcpy(a2,aa,sizeof(aa));
   ^~~~~~
In file included from /in/foo.c:2:0:
/usr/include/string.h:125:14: note: declared here
 extern char *strcpy (char *__restrict __dest, const char *__restrict __src)
              ^~~~~~

信息

递交者
类型
自测
题目
P1000 A+B Problem
语言
C
递交时间
2017-12-06 20:35:30
评测时间
2017-12-06 20:35:30
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes