我创建了一个类
TMyRect=class
public
x1,y1,x2,y2 : integer;
point1:TPoint;
point2:TPoint;
Selected:boolean;
constructor create;
end;
constructor TMyRect.create;
begin
inherited;
Selected:=False;
end;
//当我声明了
var MyRect:TMyRect;
var Point1:TPoint;
begin
point1.x:=0;
point1.y:=0;
//然后将point1赋给MyRect.point1时候
MyRect.point1 := point1
//出现异常
end;
------------------------》请问怎样解决这个问题啊?我怀疑是需要初始化myRect.point1但是我不知道怎样初始化。请高手帮忙啊!!!