Compile Error

/in/foo.cc: In function 'int count(char*, int, char, int)':
/in/foo.cc:21:19: error: invalid conversion from 'char' to 'char*' [-fpermissive]
   mycopy(t,s2,i,n1);
                   ^
/in/foo.cc:5:6: note:   initializing argument 2 of 'void mycopy(char*, char*, int, int)'
 void mycopy(char s1[],char s2[],int index,int n)
      ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:37:13: error: invalid operands of types 'const char [3]' and 'int' to binary 'operator&'
   scanf("%d"&x);
         ~~~~^~
/in/foo.cc:46:13: error: 'ls2' was not declared in this scope
    mycopy(t,ls2,n2);
             ^~~
/in/foo.cc:54:4: warning: statement has no effect [-Wunused-value]
   l-1;
   ~^~
/in/foo.cc:32:10: warning: unused variable 'n1' [-Wunused-variable]
  int num,n1,n2,l,k,n;
          ^~

信息

递交者
类型
递交
题目
P1159 最长重复子串
语言
C++
递交时间
2021-12-04 22:46:52
评测时间
2021-12-04 22:46:52
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes