title: Nested vector iteration ignoring outside vector position
body: <p>I want to loop through a nested vector, ignoring the object that the outer loop is currently at. Note: this code is just a brief draft of my program, so as not to cause confusion with my current implementation.</p>
  
  <pre><code>class A
  {
  public: 
  int no;
  }
  
  class B: public A
  {
  }
  
  class C: public A
  {
  }
  
  vector&lt;A*&gt; objects;
  
  for(vector&lt;A*&gt;::iterator it1 = objects.begin(); it1 != objects.end(); ++it1)
  {
      for(vector&lt;A*&gt;::iterator it2 = objects.begin(); it2 != objects.end(); ++it2)
      {
          if((*it1)-&gt;no == (*it2)-&gt;no)
          {
              cout &lt;&lt; "matched";
          }
          else
          {
              cout &lt;&lt; "no match";
          }
      }
  }
  </code></pre>
  
  <p>So, I want to loop through the inner loop it2, NOT checking the object at it1.</p>