01 2012 档案

摘要:1.重载构造函数overload关键字eg: constructor Create(Name:string;Sex:string;Year:integer;Tall:integer;Weight:integer);overload; constructor Create(Name:string;Sex:string);overload; ps: 重载构造函数,注意一定要使用关键字:overload2.自定义类中是否需要显式定义构造函数: 所有类默认继承自TObject,即使没有声明class(TObject),Create实际是通知编译器为其分配一块堆内存.在自定义类中,即使没有显式的定义构. 阅读全文
posted @ 2012-01-09 10:31 edisonfeng 阅读(5333) 评论(0) 推荐(1) 编辑