输入:一个源字符串,删除字符串
输出:被删除后的源字符串
#include <iostream>
#include <string.h>
using namespace std;
void DelChars(char *strsource,char *strdelete)
{
if((strsource==NULL)||(strdelete==NULL))
return;
int hash[128];
memset(hash,0,256);
while(*strdelete!='\0')
{
hash[*strdelete]=1;
strdelete++;
}
char *back,*head;
back=head=strsource;
while(*head!='\0')
{
if(hash[*head]!=1)
{
*back=*head;
back++;
}
he