char *fun(char *str)
{
int i = 0 ;
int j = 0 ;
for( ; i < strlen(str) ; i++ )
{
if( !(str[i]>='0' && str[i]<='9') )
{
str[j++] = str[i] ;
}
}
str[j] = '\0' ;
return str ;
}
~满意望采纳~
void fun(char *p)
{
int length= strlen(p);
char *b=new char [length+1];
int j=0;
for(int i=0;i
if(p[i]<'0'||p[i]>'9')
{
b[j]=p[i];
j++;
}
}
b[j]='\0';
cout<
}
int main()
{
char *p;
p="sda15sdax11s";
fun(p);
}