我与C中的strcat
功能有点问题,我要的是,有一个字符串(org_surname
),检查选择的字符是一个辅音,并将其添加到另一个字符串(coded_surname
)。Ç - 字符串错误
int lenght = strlen(org_surname); int i = 0; int count = 0;
while(i<lenght && count < 3){
if (org_surname[i] != 'a' && org_surname[i] != 'e' && org_surname[i] != 'i' && org_surname[i] != 'i' && org_surname[i] != 'u'){
strcat(coded_surname,org_surname[i]);
count++;
}
i++;
}
错误总是相同的。
"passing argoment 2 of strcat makes a from integer without a cast.
我该如何解决这个问题?