I've got two vector objects called A and B. The MyType class does not have a field ID and I want to get the MyType* which are in A but not in B.
Since I do not have an ID need to compare based on the string field.
My object's class looks like this
class Object
{
public:
Object();
string Name;
bool Mode;
string something;
Int range;
}
vector<Object*> a; //asssume filled with objects
vector<Object*> b; //asssume filled with objects
vector<Object*> ret;
Now I want to get diff of (a,b)
- all the members that are in a and not b.
How to proceed on this. I tries using strcmp()
to do the comparison but it is not working.