使用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這種「幸運」會導致衛星崩潰,並在條件改變時人們死亡。 –
「幸運」是什麼意思? –