I am trying to remove duplicates from an vector by using an unordered_set. but my design creates an unordered_set that doesn't maintain the ordering correctly. in this example the "z" is not at the end. What am I doing wrong? thank you in advance.
I wish to test unordered_set with my own hash function:I tried to compile it, while clang gives a huge amount of errors:
Consider the following program. The loop in the middle attempts to replace exactly one item with one other item, and then breaks out of the loop.