Is there any way to compare two vectors?
if (vector1 == vector2)
DoSomething();
Note: Currently, these vectors are not sorted and contain integer values.
Check out the std::mismatch
method of C++.
Comparing vectors has been discussed on DaniWeb forum and also answered:
Check out the below SO post. It will be helpful to you. They have achieved the same with two different methods.
How do I get the number of different or common elements between two vectors of strings?