/ XMU_ACM /

记录详情

Compile Error

/in/foo.c: In function 'rev':
/in/foo.c:9:9: error: subscripted value is neither array nor pointer nor vector
   y[i]=x[len-i];
         ^
/in/foo.c:12:7: error: subscripted value is neither array nor pointer nor vector
   if(x[i]!=y[i])
       ^
/in/foo.c: In function 'main':
/in/foo.c:23:5: warning: 'gets' is deprecated [-Wdeprecated-declarations]
     gets(a);
     ^~~~
In file included from /in/foo.c:1:0:
/usr/include/stdio.h:640:14: note: declared here
 extern char *gets (char *__s) __wur __attribute_deprecated__;
              ^~~~
/in/foo.c:24:12: warning: passing argument 1 of 'rev' makes integer from pointer without a cast [-Wint-conversion]
  int x=rev(a,strlen(a));
            ^
/in/foo.c:4:5: note: expected 'char' but argument is of type 'char *'
 int rev(char x,int len)
     ^~~
/in/foo.c:26:3: error: expected ';' before 'else'
   else printf("NO")
   ^~~~

信息

递交者
类型
递交
题目
简单回文串
语言
C
递交时间
2024-03-04 10:51:16
评测时间
2024-03-04 10:51:16
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes