1.删除指定字符
void del_char(char* str,char ch)
{
char *p = str;
char *q = str;
while(*q)
{
if (*q !=ch)
{
*p++ = *q;
}
q++;
}
*p='\0';
}
1.删除指定字符
void del_char(char* str,char ch)
{
char *p = str;
char *q = str;
while(*q)
{
if (*q !=ch)
{
*p++ = *q;
}
q++;
}
*p='\0';
}