how to find duplicates in std::vector<string> and return a list of them?
问题 So if I have a vector of words like: Vec1 = "words", "words", "are", "fun", "fun" resulting list: "fun", "words" I am trying to determine which words are duplicated, and return an alphabetized vector of 1 copy of them. My problem is that I don't even know where to start, the only thing close to it I found was std::unique_copy which doesn't exactly do what I need. And specifically, I am inputting a std::vector<std::string> but outputting a std::list<std::string> . And if needed, I can use