I have a class hierarchy, this one:
type
TMatrix = class
protected
//...
public
constructor Create(Rows, Cols: Byte);
//...
type
TMinMa
You need overload for both constructors if they have the same name.
type
TMatrix = class
protected
//...
public
constructor Create(Rows, Cols: Byte);
//...
type
TMinMatrix = class(TMatrix)
public
constructor Create(Rows, Cols: Byte); overload;
constructor Create(var that: TMinMatrix); overload;
end;
It is good practice to call the inherited constructor.
constructor TMinMatrix.Create(Rows, Cols: Byte);
begin
inherited Create(Rows, Cols); // Need to call the full name if the parameters are changed.
//...
end;