title: Can I use ' == ' to compare two vectors. I tried it and seems to be working fine. But I don't know whether it will work in more complex situations
body: <p>First example:</p>
  
  <pre><code>int main(){
      using namespace std;   
      vector&lt;int&gt; v1{10, 20, 30, 40, 50};
      vector&lt;int&gt; v2{10, 20, 30, 40, 50};
  
      if(v1==v2)
          cout&lt;&lt;"equal";
      else
          cout&lt;&lt;"unequal";
  }   // it returns equal 
  </code></pre>
  
  <p>Second example:</p>
  
  <pre><code>int main(){
      using namespace std;   
      vector&lt;int&gt; v1{10, 20, 30, 40, 50};
      vector&lt;int&gt; v2{10, 20, 100000, 40, 50};
  
      if(v1==v2)
          cout&lt;&lt;"equal";
      else
          cout&lt;&lt;"unequal";
  }   // it returns notequal 
  </code></pre>