冰
冰冷的雨
Unregistered / Unconfirmed
GUEST, unregistred user!
如题,出现错误[Error] uCustom.PAS(43): Unsatisfied forward
or external declaration: 'TExpen.Create'
相关代码如下:
type
TStruct = record
x: integer;
y: integer;
end;
TCustom = class(TObject)
private
FOwner: integer;
FStruct: TStruct;
protected
procedure UpdateCommonnes(AOwner: TStruct);
public
constructor Create
overload;virtual;
constructor Create(AOwner: TStruct)
overload;virtual;
end;
TExpend = class(TCustom)
public
constructor Create
reintroduce;override;
constructor Create(AOwner: TStruct)
reintroduce;override;
end;
implementation
constructor TCustom.Create;
begin
inherited Create;
end;
constructor TCustom.Create(AOwner: TStruct);
begin
inherited Create;
UpdateCommonnes(AOwner);
end;
constructor TCustom.UpdateCommonnes(AOwner: TStruct);
begin
if AOwner<>nil then
FStruct := AOwner;
end;
constructor TExpend.Create;
begin
inherited;
FOwner := 0;
end;
constructor TExpend.CreateCreate(AOwner: TStruct);
begin
inherited;
FOwner := 0
end;
or external declaration: 'TExpen.Create'
相关代码如下:
type
TStruct = record
x: integer;
y: integer;
end;
TCustom = class(TObject)
private
FOwner: integer;
FStruct: TStruct;
protected
procedure UpdateCommonnes(AOwner: TStruct);
public
constructor Create
overload;virtual;
constructor Create(AOwner: TStruct)
overload;virtual;
end;
TExpend = class(TCustom)
public
constructor Create
reintroduce;override;
constructor Create(AOwner: TStruct)
reintroduce;override;
end;
implementation
constructor TCustom.Create;
begin
inherited Create;
end;
constructor TCustom.Create(AOwner: TStruct);
begin
inherited Create;
UpdateCommonnes(AOwner);
end;
constructor TCustom.UpdateCommonnes(AOwner: TStruct);
begin
if AOwner<>nil then
FStruct := AOwner;
end;
constructor TExpend.Create;
begin
inherited;
FOwner := 0;
end;
constructor TExpend.CreateCreate(AOwner: TStruct);
begin
inherited;
FOwner := 0
end;