Keep the second vector<char> and "mark" the elements you've decided
> So, in the past, I have copied the vector
> first and manipulated the copy vice the original when I process the
> data. However, then I have to keep track of which items in the
> original vector have already been merged away. For example, I compare
> items 1 and 2, and I decide to delete 2. So, then after I finish all
> the comparisons with item 1, I need to do that with item 3 (not 2,
> which I`ve deleted in the copied vector.
> In addition to being complicated in the past, this has been slow.
> Is there a better approach? I come across the same scenario
Or write a proper functor and use 'remove_if'. You can rely on the
requirement that elements of a vector exist in an array...