title: Remove duplicate element from vector of vectors c++
body: <p>I'm trying to remove a duplicated item from a bigger vector<br>
  Ex: </p>
  
  <pre><code>6 11  
  7 8
  6 16 17
  </code></pre>
  
  <p>I should get:</p>
  
  <pre><code>6 11  
  7 8
  16 17
  </code></pre>
  
  <p>What I have:</p>
  
  <pre><code>vector&lt;vector&lt;int&gt;&gt;B;
  vector&lt;vector&lt;int&gt;&gt;::iterator b_list;
  vector&lt;vector&lt;int&gt;&gt;::iterator b_it;
  vector&lt;int&gt;::iterator b_list_it;
  vector&lt;int&gt;::iterator b_it_it;
  for (b_list = B.begin(); b_list != B.end()-1; ++b_list)
  {
      for (b_it = b_list+1; b_it != B.end(); ++b_it)
      { 
          for (int i = 0; i &lt; (*b_list).size(); ++i)
          {
              for (int j = 0; j &lt; (*b_it).size(); ++j)
              {
                  if ((*b_list)[i] == (*b_it)[j])
                  {
                      if ((*b_list).size() &gt; (*b_it).size())
                          {   
                              (*b_list).erase((*b_list).begin());
                          }
                          if ((*b_list).size() &lt; (*b_it).size())
                          {
                              (*b_it).erase((*b_it).begin());
                          }
                  }
               }
           }
       }
  }
  </code></pre>
  
  <p>In this case erase() doesn't remove anything. Why could it be so? And what could be used instead of it?</p>
  
  <p>Thank You!</p>