Hi, I am trying to overload the relational operator and compare objects from different classes.
say for instance I have:
class A{
int x;
};
class B : public A{
int y;
};
I would like to have code in main that looks like A < B, where x and y are being compared.
I don't know which class to put the operator function in.
I think I need a Programmer Defined Conversion Function? but I am not sure how to use one. Any help would be appreciated.