БУДУ ОЧЕНЬ БЛАГОДАРЕН ЗА ПОМОЩЬ!
БУДУ ОЧЕНЬ БЛАГОДАРЕН ЗА ПОМОЩЬ!
#include <string>
#include <iostream>
using namespace std;
int main(int argc, char* argv[]) {
string s1 = "This is a test string";
string s2 = "is";
cout << "String #1 (s1):" << endl << s1 << endl;
cout << "String #2 (s2):" << endl << s2 << endl;
string::size_type find_pos = 0;
while((find_pos = s1.find(s2, find_pos)) != string::npos)
s1.erase(find_pos, s2.length());
cout << endl << "String #1 (s1) without substring s2:" << endl << s1 << endl;
return 0;
}
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.