Hi i'm trying to remove duplicate values from my vector. It is set up as a vector. This vector contains a list of vectors, in each of the interior vectors is 3 strings.
I tried:
removeCopies.erase( unique(removeCopies.begin(), removeCopies.end() ), removeCopies.end());
but it still leaves some strings inside the interior vector like:
mainVector: {
interiorVector1: string 1: "book", string 2: "noun", string3: "A book"
interiorVector2: string 1: "book", string 2: "noun", string3: "a BOok"
}
I also can't just change it all to lowercase, I can't edit the values inside of the vector.
If you need a better explanation, please ask. Thank you.
edit:
I tried
unique(stringVec.begin(), stringVec.end(), [](const string &a, const string
&b) { return lowercase(a) == lowercase(b); }), stringVec.end()
where lowercase() turns the entire string to lowercase. But it doesn't allow me to access the interior vector strings to do this.