Just a couple of things i spotted
Change this toCode:if(checkarea(&rect) != 0); { return 0; }
AndCode:if((checkarea(&rect)) != 0) { return 0; }
toCode:if (recta->GetArea()==100)
Apart from that it looks ok to me.Code:if ((recta->GetArea()) == 100)