使用strcat函数时出现问题。我没有idea.please帮助me.thanks使用strcat与strcpy发生问题
char dst[5]="hello";
char *a = "12345";
char *b = "54321";
//work
strcat(strcpy(dst, a), b);
printf("one==%s\n",dst);
//error
strcpy(dst, a);
strcat(dst, b);
printf("two==%s\n",dst);
你只是幸运的是,第一个案件工作。 –
@Dayalrai这种“幸运”会导致卫星崩溃,并在条件改变时人们死亡。 –
“幸运”是什么意思? –