自定义的类a,create,初始化参数 x:=1;//顺序1
b继承a, create参数y:=2;//顺序2
c继承b, create 参数bitmap:=tbitmap.create;//顺序3现在创建实例 cc:=t.create;
析构时,想按顺序1,2,3执行,
试了几次,不能肯定自己是对的,
请delphi高手指导
b继承a, create参数y:=2;//顺序2
c继承b, create 参数bitmap:=tbitmap.create;//顺序3现在创建实例 cc:=t.create;
析构时,想按顺序1,2,3执行,
试了几次,不能肯定自己是对的,
请delphi高手指导
解决方案 »
- 其他格式的数据要导入到sqlserver数据库中,用什么样的方式导入会比较好一点?
- csdn的第4个,第5个裤头要多少分阿。
- 线程释放问题?急啊!!!
- ehlib+ADO的问题
- 征求算法: 判断 (3, 5, 11, 6, ..) 与 (6, 3, 5, 11, ) 等效?
- 我要做个办公室OA,大家给我一点经验啊
- 菜鸟求教~~急用~~帮帮忙啊~~
- 请教一个 MDI 的问题
- 請各位幫忙~~~~~~~~!
- 刚才的SQL我自己解决了!这个打印怎么解决啊!
- delphi 怎样用delphi获取磁盘的序列号呢?最好给段代码 谢谢
- 求寻电子书和附光盘:没钱买《Delphi开发技术大全》. 作者:明日科技梁水李方超赛奎春 出版社:人民邮电出版社
a = class
public
x: Integer;
constructor Create(param_x: Integer);
end; b = class(a)
public
y: Integer;
constructor Create(param_x: Integer;param_y: Integer); //
end; c = class(b)
public
bitmap: TBitmap;
constructor Create(param_x: Integer;param_y: Integer;aBitmap: TBitmap);
end;implementationconstructor a.Create(param_x: Integer);
begin
Inherited Create;
x := Param_x;
end;constructor b.Create(param_x: Integer;param_y: Integer);
begin
Inherited Create(param_x);
y := Param_y;
end;constructor c.Create(param_x: Integer;param_y: Integer;aBitmap: TBitmap);
begin
Inherited Create(param_x,param_y);
Bitmap := aBitmap;
end;
var
cc: c;
begin
cc := c.Create(1,2,TBitmap.Create);
end;
a = class
public
x: Integer;
constructor Create; virtual;//定义为虚函数
end; b = class(a)
public
y: Integer;
constructor Create;override; //覆盖虚函数
end; c = class(b)
public
bitmap: TBitmap;
constructor Create;override; //覆盖虚函数
end;implementationconstructor a.Create;
begin
Inherited Create;
x := 1;
end;constructor b.Create;
begin
Inherited Create;
y := 2;
end;constructor c.Create;
begin
Inherited Create;
Bitmap := TBitmap.Create;
end;
var
cc: c;
begin
cc := c.Create;
end;