I’ve two vectors having pointers to my custom class object.
The pointers in these two vectors don’t point to the same object, but the values stored in the objects are same.
My custom class structure is:
Class Item
{
string ItemId;
string ItemDescription;
float ItemPrice;
}
The first vector(V1) is having n entries and the second vector(V2) is having m entries (n>m).
I've to perform two operations:
How to do this in an efficient manner??
Here is example of how to do it using STL set_intersection and set_difference to get what you wanted: