The point is that we would like to see what you've done so far so we can help you. The fact that you have not finished this indicates that you have specific errors. If you describe these errors with some relevant code snippets we can help you work through them.

Us flat out giving you code is not beneficial to your (or us, in the long run).

They certainly can, that's what they are for, mostly used with vector (or some other STL containers). Just see the example for std::unique.

Hint: Using a set instead of a vector is probably the easiest way to do this (although using "sort" and then "unique" is arguably more efficient). You can even write almost the entire program in one line (but that's going a bit too far).