#include #include // provides ostream_iterator #include #include #include // provides srand and rand #include // provides time void main() { vector v(1000); srand(time(0)); generate(v.begin(), v.end(), rand); // generate 1000 random numbers deque d(v.size); // unique_copy accepts two input iterators and an output iterator. unique_copy(v.begin(), v.end(), d.begin()); // copy only unique characters // copy accepts two input iterators and an output iterator copy(d.begin(), d.end(), ostream_iterator(cout," ")); // stream data to cout and use " " for separation }