Тема: [C++] Видалити слова
// потрібно видалити всі слова що входять в текст по одному разу
#include <iostream>
#include <string>
#include <string.h>
#include <vector>
#include <algorithm>
using namespace std;
int main()
{
    char *tk, *spt = ", . ! ? ;";
    char st[] = " lost , live love live ? life life lord .";
    cout << st << endl;
    tk = strtok(st, spt);
    vector<string>::iterator tk;
    while (tk)
    {
        char *is = nullptr;
        is = strstr(st,tk);
        if (is != nullptr)
            st.erase(tk)  // я не розумію
        tk = strtok(NULL,spt);
    }
    cout << st << endl;
    return 0;
}