在字符串指针中找到与制定字符相同的字符并将其从字符串中删除

void delcharfun(char str,char ch){
int i=0,j=0;
while (
(str+i)){
if((str+i)==ch){
j=i;
while(
(str+j)){
(str+j)=(str+j+1);
j++;
}
}
else i++;
}
}

posted @ 2020-12-04 16:48  Auterman  阅读(165)  评论(0)    收藏  举报