求找错,感觉错误挺明显就是改不了
#include<stdio.h>char* stingcat(char s1[],char s2[]){
int length=0;
char *s=NULL;
char *c=s1;
for(;*c!='\0';++c,length++);
c=s2;
for(;*c!='\0';++c,length++); c = new char[length];
s=s1;
int i=0;
while(*s!='\0')
{
c[i++]=*s;
++s;
}
s=s2;
while(*s!='\0')
{
c[i++]=*s;
++s;
} c[i]='\0';
return c;}int main()
{
printf("%s",stingcat("abc","defg"));
}