你的Private,Protect,Public这些冬冬呢?
type
tmyclass=class
private
protect
public
procedure wow;virtual;
end;
type
tnewmyclass=class(tmyclass)
private
protect
public
procedure wow;override;
end;
type
tmyclass=class
private
protect
public
procedure wow;virtual;
end;
type
tnewmyclass=class(tmyclass)
private
protect
public
procedure wow;override;
end;
比如
function myfun(age:integer): string;
function myfun(age:string): string;
就是重载,当你调用myfun(int)时,系统会自动调用第一个函数
如果调用myfun('abc')系统会自动调用第二个函数
此谓之重载overload