title: Subtraction and Intersection of two vectors of pointers in C++
body: <p>I've two vectors having pointers to my custom class object.<br>
  The pointers in these two vectors don't point to the same object, but the values stored in the objects are same.  </p>
  
  <p>My custom class structure is:<br>
  <pre><code>
  Class Item
  {
     string ItemId;
     string ItemDescription;
     float ItemPrice;
  }
  </pre></code>
  The first vector(<strong>V1</strong>) is having <em>n</em> entries and the second vector(<strong>V2</strong>) is having <em>m</em> entries <em>(n>m)</em>.  </p>
  
  <p>I've to perform two operations:<br>
  <li>Get a vector which has common objects in both <strong>V1</strong> and <strong>V2</strong>. <em>By common, I mean to say that the ItemId for the elements is same.</em> (Can be referred as <strong><em>Intersection of V1 and V2</em></strong>).</p>
  
  <p><li>Get a vector which has the elements which are not present in <strong>V2</strong>. (Can be referred as <strong><em>V1-V2</em></strong>).</p>
  
  <p><strong>How to do this in an efficient manner??</strong></p>