i inherited a TPanel component and tried to overlaod its operator<. but my operation was useless as i saw when i debugged the code, my operator< does not work indeed.
here is what i have done;
this is my class;
class MyClassublic TPanel
this is my operator<;
bool MyClass:perator<(const MyClass* y)const
{
if(w < y->GetW())
{
return false;
}
if(w==y->GetW())
{
if(h < y->GetH())
return false;
else
return true;
}
else
return true;
};
and this is my declaration;
HIDESBASE bool operator<(const MyClass *)const;
what have i forgatten?, any idea?
here is what i have done;
this is my class;
class MyClassublic TPanel
this is my operator<;
bool MyClass:perator<(const MyClass* y)const
{
if(w < y->GetW())
{
return false;
}
if(w==y->GetW())
{
if(h < y->GetH())
return false;
else
return true;
}
else
return true;
};
and this is my declaration;
HIDESBASE bool operator<(const MyClass *)const;
what have i forgatten?, any idea?