记录详情

Compile Error

/in/foo.c: In function 'en':
/in/foo.c:9:9: error: subscripted value is neither array nor pointer nor vector
        s[i++]=t+'0';
         ^
/in/foo.c:11:9: error: subscripted value is neither array nor pointer nor vector
        s[i++]=t-10+'A';
         ^
/in/foo.c:14:6: error: subscripted value is neither array nor pointer nor vector
     s[i]='\0';
      ^
/in/foo.c:16:14: error: subscripted value is neither array nor pointer nor vector
        temp=s[i],s[i]=s[t],s[t]=temp;
              ^
/in/foo.c:16:19: error: subscripted value is neither array nor pointer nor vector
        temp=s[i],s[i]=s[t],s[t]=temp;
                   ^
/in/foo.c:16:24: error: subscripted value is neither array nor pointer nor vector
        temp=s[i],s[i]=s[t],s[t]=temp;
                        ^
/in/foo.c:16:17: warning: left-hand operand of comma expression has no effect [-Wunused-value]
        temp=s[i],s[i]=s[t],s[t]=temp;
                 ^
/in/foo.c:16:29: error: subscripted value is neither array nor pointer nor vector
        temp=s[i],s[i]=s[t],s[t]=temp;
                             ^
/in/foo.c:16:27: warning: left-hand operand of comma expression has no effect [-Wunused-value]
        temp=s[i],s[i]=s[t],s[t]=temp;
                           ^
/in/foo.c: In function 'encrypt':
/in/foo.c:23:24: warning: passing argument 3 of 'en' makes integer from pointer without a cast [-Wint-conversion]
            en(a[i]+5,8,s);
                        ^
/in/foo.c:3:6: note: expected 'char' but argument is of type 'char *'
 void en(char c,int n,char s)
      ^~
/in/foo.c:25:30: warning: passing argument 3 of 'en' makes integer from pointer without a cast [-Wint-conversion]
                 en(a[i]-5,16,s);
                              ^
/in/foo.c:3:6: note: expected 'char' but argument is of type 'char *'
 void en(char c,int n,char s)
      ^~
/in/foo.c: At top level:
/in/foo.c:30:6: warning: return type of 'main' is not 'int' [-Wmain]
 void main()
      ^~~~
/in/foo.c: In function 'main':
/in/foo.c:33:12: error: expected expression before 'char'
    encrypt(char a[30],char b[30]);
            ^~~~
/in/foo.c:33:4: error: too few arguments to function 'encrypt'
    encrypt(char a[30],char b[30]);
    ^~~~~~~
/in/foo.c:18:6: note: declared here
 void encrypt(char a[],char b[])
      ^~~~~~~
/in/foo.c:32:16: warning: unused variable 'a' [-Wunused-variable]
    static char a[30]="No.1",b[100];
                ^
/in/foo.c: At top level:
/in/foo.c:37:1: error: expected identifier or '(' before '}' token
 }
 ^
/in/foo.c:32:16: warning: 'a' defined but not used [-Wunused-variable]
    static char a[30]="No.1",b[100];
                ^

信息

递交者
类型
自测
题目
2-1 改错题
语言
C
递交时间
2018-12-31 16:36:31
评测时间
2018-12-31 16:36:31
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes