First example:
int main(){ using namespace std; vector v1{10, 20, 30, 40, 50}; vector v2{10, 20, 30, 40, 50}; if(v1==v2
Yes, you can use operator== to compare two std::vectors. It will return true only if the vectors are the same size and all elements compare equal.
std::vector
true