【发布时间】:2008-12-04 14:53:46
【问题描述】:
这行得通:
constructor TMyObj.Create;
begin
inherited;
end;
为什么这也不起作用?
function TMyObjEx.Import(CONST FileName: string; CONST x, y, z: Integer): string;
begin
result:= inherited; // Import(FileName, x, y, z); <--- Compiler says: "incompatible types"
//do other stuff here
end;
TMyObjEx 的声明是这样的:
TYPE
TMyObj = class(TChObj)
private
protected
public
function Import (CONST FileName: string; CONST x, y, z: Integer): string; virtual;
end;
TMyObjEx= class(TMyObj)
private
protected
public
function Import(CONST FileName: string; CONST x, y, z: Integer): string; override;
end;
【问题讨论】:
-
Stackoverflow 应该有另一个类别“非建设性批评”,提问者批评伪装成问题的语言、库或工具。
标签: delphi