#include<iostream>
#include<cstdlib>
using namespace std;
class rec
{
private:
int width,length,area;
public:
rec(int w=1,int l=1)
{
width=w;
length=l;
area=w*l;
}
bool operator > (rec temp_rec)
{
if(area>temp_rec.area)
{
return true;
}
return false;
}
bool operator == (rec temp_rec)
{
if(area==temp_rec.area)return true;
return false;
}
};
int main()
{
rec a(5,10),b(10,6);
if(a>b)
{
cout<<"a>b\n";
}
else if(a==b)
{
cout<<"a=b\n";
}
else
{
cout<<"a<b\n";
}
system("pause");
return 0;
}

Hubert's Coding Notes
Useful notes for CS people