Just a couple of things i spotted

Code:
if(checkarea(&rect) != 0);
{
  return 0;
}
Change this to

Code:
if((checkarea(&rect)) != 0)
{
  return 0;
}
And

Code:
if (recta->GetArea()==100)
to

Code:
if ((recta->GetArea()) == 100)
Apart from that it looks ok to me.