It is hard to tell exactly why your program crashes without seeing how you declare and initialize words and index.
However, what is most likely to happen is that after removing an element from words, and after all the subsequent elements have been shifted to the left by one position, the indices in index may index positions which are beyond the new end of the vector.
When i is greater than the size of the vector, evaluating words.begin() + i will result in undefined behavior (which in your case is manifesting itself as a crash).
If your vector of indices is sorted in increasing order, just revert your loop:
for(int t1 = index.size() - 1; t1 >= 0; --t1) { words.erase(words.begin() + index[t1]); }
Or alternatively, you can use your original loop and sort the indices in decreasing order.