I faced a little trouble – I do not know if I can define my own operators for my classes. For example:
type TMinMatrix = class(TMatrix) private RowAmount: Byte; ColAmount: Byte; Data: DataMatrix; DemVector, SupVector: SupplyDemand; public constructor Create(Rows, Cols: Byte); function GetRowAmount: Byte; override; function GetColAmount: Byte; override; destructor Destroy; end;
How can I – or can`t I:) – do something like:
TMinMatrix TMinMatrix::operator=(TMinMatrix* matr) (c++ code)
And, by the way, can I define copy constructor for my class?
Operator overloading is possible in Delphi .NET versions, older versions of Delphi don’t support it.