1sort( vec.begin(), vec.end() );
2vec.erase( unique( vec.begin(), vec.end() ), vec.end() );
1sort( vec.begin(), vec.end() );
2vec.erase( unique( vec.begin(), vec.end() ), vec.end() );
3
1sort( res.begin(), res.end() );
2res.erase( unique( res.begin(), res.end() ), res.end() );
3
4SYNTAX:
5ForwardIterator unique (ForwardIterator first, ForwardIterator last);
6
7first: Forward iterator to the first element in the container.
8last: forward iterator to the last element in the container.