摘要:
题目:输入两个字符串,从第一字符串中删除第二个字符串中所有的字符。例如,输入”They are students.”和”aeiou”, 则删除之后的第一个字符串变成”Thy r stdnts.”。我写的代码,已通过测试,复杂度高。#include<iostream>using namespace std;char *deletestr(char *str1,char *str2){ char *str=new char[strlen(str1)]; int i=0; while(*str1!='\0') { char *matchstr=str2;int flag= 阅读全文