You can do this in about five lines of code, if you know the algorithms.
First, sort the two vectors using std::sort().
(Alternatively, make std::set<>s out of them.)
Next, use std::set_intersection algorithm on the two vectors.
If the intersection is empty, then there were no duplicate values.