This problem drives me crazy.I have vectorA(float),vectorB(string1),vectorC(string2) which are parallel and i want to eliminate the duplicates in vectorA ,while i manage to retain the
parallelity among the vectors.
Any ideas?
This problem drives me crazy.I have vectorA(float),vectorB(string1),vectorC(string2) which are parallel and i want to
Share
Create a
set<float>for items that you have seen, scan throughvectorArecording duplicate indexes, then delete indexes that you marked as duplicates while going back starting at the end of the vectors.Going back is important, because otherwise your indexes will get out of sync.