Заголовок C ++ Builder и код для Delphi

Я пытаюсь преобразовать код C ++ Builder в Delphi, и я столкнулся с некоторыми неопределенностями, если код на самом деле правильный. Я был бы признателен эксперту за тем, в каких областях я должен был бы исправить ситуацию, если я допустил ошибку. Это также процесс обучения для меня, так как я впервые попробовал что-то подобное.

Я также опустил «Свойства» для класса TAssistor, так как я не уверен, как это сделать в Delphi.

Я заранее благодарю всех за любую помощь, которую вы можете предложить.

Файл: assistor.h

#ifndef assistorH
#define assistorH
#include "OrsaDll.h"#include "ievect.hpp"#include "ieview.hpp"enum TAssistorType  {astDummy, astKeys, astGrid, astBox, astMatch};
class TDescContainer
{
public:
struct descContainer
{
keypointsData kp;
TIERectangle  rect;
};
TDescContainer(void) {CellSize = 0; Cell = 0; }
virtual ~TDescContainer(void) {ClearCells(); }
void ClearCells(void)
{
if (Cell)
{
for (int i = 0; i < CellSize; i++)
{
delete []Cell[i].kp.Data;
Cell[i].kp.Data = 0;
}
}
delete []Cell;
CellSize = 0;
}
void CreateCells(int size)
{
ClearCells();
CellSize = size;
Cell = new descContainer[size];
for (int i = 0; i < CellSize; i++)
{
Cell[i].kp.Data = 0;
Cell[i].kp.Count = 0;
}
}
void Keys2Cell(keypointsData *keyPoints, int index)
{
if (Cell[index].kp.Data)
delete [] Cell[index].kp.Data;
Cell[index].kp.Data = new keypoint[keyPoints->Count];
Cell[index].kp.Count = keyPoints->Count;
for (int i = 0; i < keyPoints->Count; i++)
Cell[index].kp.Data[i] = keyPoints->Data[i];
}
void Cell2Keys(keypointsData *keyPoints, int index)
{
if (keyPoints->Count != Cell[index].kp.Count)
{
if (keyPoints->Count > 0)
delete [] keyPoints->Data;
keyPoints->Count = Cell[index].kp.Count;
keyPoints->Data = new keypoint[keyPoints->Count];
}
for (int i = 0; i < keyPoints->Count; i++)
keyPoints->Data[i] = Cell[index].kp.Data[i];
}
//
descContainer *Cell;
int CellSize;
};
//--------------------------------------------------------------------------
class TAssistor // TODO: inherit base class. example: TAssistorGrid:
TAssistorBase
{
private:
TImageEnVect *_paint;
int *_hAssistorObject, _hAssistorSize, _hAssistorIndex;
int _boxID;
TAssistorType _assType;
void collectBoxes(void);
public:
TAssistor(TImageEnVect *paint);
virtual ~TAssistor(void);
//
void Add(int hobj, bool anchorToLayer = true);
void Delete(void);
void CreateGrid(int rows, int cols, int penSize, TColor penColor);
void CreateKeys(TDescContainer &dscC, int sigma, int penSize, TColor
penColor);
void PrepareAddBox(int penSize, TColor penColor, TColor brushColor);
void PrepareMoveBox(void);
void DeleteBox(void);
void MoveBox(void);
void Hide(bool full = false);
void Show(bool full = false);
TIERectangle GetObjRect(int val);
// events
void __fastcall NewBox(TObject *Sender, int hobj);
// properites
__property int Size = {read = _hAssistorSize};
__property int *Object = {read = _hAssistorObject};
__property TAssistorType Type = {read = _assType};
};
#endif

Файл: assistor.cpp

#include <vcl.h>
#pragma hdrstop
#include "assistor.h"//--------------------------------------------------------------------------
#pragma package(smart_init)
//--------------------------------------------------------------------------
TAssistor::TAssistor(TImageEnVect *paint)
{
_paint = paint;
_hAssistorObject = 0;
_hAssistorSize = 0;
_hAssistorIndex = 0;
_assType = astDummy;
_boxID = 99;
}
//--------------------------------------------------------------------------
TAssistor::~TAssistor(void)
{
Delete();
}
//--------------------------------------------------------------------------
void TAssistor::Add(int hobj, bool anchorToLayer)
{
if (_hAssistorIndex < _hAssistorSize)
{
_hAssistorObject[_hAssistorIndex++] = hobj;
if (anchorToLayer)
_paint->ObjLayer[hobj] = _paint->LayersCurrent;
}
}
//--------------------------------------------------------------------------
void TAssistor::Delete(void)
{
if (_hAssistorObject)
{
for (int i = _hAssistorSize - 1; i >= 0; i--)
_paint->RemoveObject(_hAssistorObject[i]);
delete [] _hAssistorObject;
_hAssistorObject = 0;
_hAssistorSize = 0;
_hAssistorIndex = 0;
}
}
//--------------------------------------------------------------------------
void TAssistor::Show(bool full)
{
if (_hAssistorObject)
{
for (int i = 0; i <_hAssistorSize; i++)
{
if (full)
_paint->ObjStyle[_hAssistorObject[i]] = TIEVStyle()
<<ievsSelectable<<ievsVisible<<ievsMoveable<<ievsSizeable;
else
_paint->ObjStyle[_hAssistorObject[i]] = TIEVStyle()<<ievsVisible;
}
}
}
//--------------------------------------------------------------------------
void TAssistor::Hide(bool full)
{
if (full)
{
_    paint->MouseInteractVt = TIEMouseInteractVt();    // disable all
interactions
_paint->OnNewObject = 0;                           // disable events
}
//
if (_hAssistorObject)
{
for (int i = 0; i <_hAssistorSize; i++)
_paint->ObjStyle[_hAssistorObject[i]] = TIEVStyle();
}
}
//--------------------------------------------------------------------------
void TAssistor::CreateGrid(int rows, int cols, int penSize, TColor penColor
)
{
_assType = astGrid;
Delete();
// create grid as bunch of boxes so it can be converted to sizable boxes if necessary
int hobj;
int iWidth  = _paint->IEBitmap->Width;
int iHeight = _paint->IEBitmap->Height;
double tileWidth, tileHeight, curX, curY;
_hAssistorSize = cols * rows;
tileWidth  = iWidth * 1.0 / cols;
tileHeight = iHeight * 1.0 / rows;
_hAssistorObject = new int[_hAssistorSize];
curY = 0.0f;
for (int i = 0; i < rows; i++)
{
curX = 0.0f;
for (int j = 0; j < cols; j++)
{
hobj = _paint->AddNewObject();
_paint->ObjKind[hobj] = iekBOX;
_paint->ObjBrushStyle[hobj] = bsClear;
_paint->ObjTop[hobj]  =  (int)curY;
_paint->ObjLeft[hobj] =  (int)curX;
_paint->ObjWidth[hobj]  = (int)tileWidth;
_paint->ObjHeight[hobj] = (int)tileHeight;
_paint->ObjPenWidth[hobj] =  penSize;
_paint->ObjPenColor[hobj] =  penColor;
_paint->ObjStyle[hobj] = TIEVStyle()<<ievsVisible;
Add(hobj);
curX += tileWidth;
}
curY += tileHeight;
}
}
//--------------------------------------------------------------------------
// show keypoints as circles
//--------------------------------------------------------------------------
void TAssistor::CreateKeys(TDescContainer &dscC, int sigma, int penSize, TColor penColor)
{
_assType = astKeys;
Delete();
int kpsSize = 0;
for (int i = 0; i < dscC.CellSize; i++)
kpsSize += dscC.Cell[i].kp.Count;
_hAssistorSize = kpsSize;
_hAssistorObject = new int[_hAssistorSize];
// show keypoints
int hobj, radius;
keypoint *key;
for (int i = 0; i < dscC.CellSize; i++)
{
for (int j = 0; j < dscC.Cell[i].kp.Count; j++)
{
key = &(dscC.Cell[i].kp.Data[j]);
hobj = _paint->AddNewObject();
radius = ceil(key->scale * sigma);  // initial sigma
_paint->ObjPenWidth[hobj] =  penSize;
_paint->ObjPenColor[hobj] = penColor;
_paint->ObjBrushStyle[hobj] = bsClear;
_paint->ObjKind[hobj] = iekELLIPSE;
//paint->ObjTop[hobj] =  PaintView->IEBitmap->Height - 1 - (int)kfDesc[i].x - radius;
_paint->ObjTop[hobj]  =  key->y - radius + dscC.Cell[i].rect.y;
_paint->ObjLeft[hobj] =  key->x - radius + dscC.Cell[i].rect.x;
_paint->ObjWidth[hobj] =  radius*2;
_paint->ObjHeight[hobj] = radius*2;
_paint->ObjStyle[hobj] = TIEVStyle();
Add(hobj);
}
}
}
//--------------------------------------------------------------------------
void TAssistor::PrepareAddBox(int penSize, TColor penColor, TColor brushColor)
{
_assType = astBox;
_paint->OnNewObject = NewBox;
_paint->ObjKind[IEV_NEXT_INSERTED_OBJECT] = iekBOX;
_paint->ObjBrushStyle[IEV_NEXT_INSERTED_OBJECT] = bsCross;
_paint->ObjBrushColor[IEV_NEXT_INSERTED_OBJECT] = brushColor;
_paint->ObjPenWidth[IEV_NEXT_INSERTED_OBJECT] =  penSize;
_paint->ObjPenColor[IEV_NEXT_INSERTED_OBJECT] =  penColor;
_paint->MouseInteractVt = TIEMouseInteractVt()<<miPutBox;
}
//--------------------------------------------------------------------------
void TAssistor::PrepareMoveBox(void)
{
_assType = astBox;
Show(true);
_paint->MouseInteractVt = TIEMouseInteractVt()<<miObjectSelect;
}
//--------------------------------------------------------------------------
void TAssistor::DeleteBox(void)
{
for (int i = _paint->SelObjectsCount-1; i >= 0; i--)
{
if (_paint->ObjID[_paint->SelObjects[i]] == _boxID)
_paint->RemoveObject(_paint->SelObjects[i]);
}
CollectBoxes();
}
//--------------------------------------------------------------------------
// private method
//--------------------------------------------------------------------------
void TAssistor::CollectBoxes(void)
{
_assType = astBox;
if (_hAssistorObject)
{
delete [] _hAssistorObject;
_hAssistorObject = 0;
_hAssistorSize = 0;
_hAssistorIndex = 0;
}
// collect boxes
int i, hobj, numBoxes = 0;
for (int i = 0; i < _paint->ObjectsCount; i++)
{
hobj = _paint->GetObjFromIndex(i);
if (_paint->ObjID[hobj] == _boxID)
numBoxes++;
}
_hAssistorSize = numBoxes;
_hAssistorObject = new int[_hAssistorSize];
// boxes
for (i = 0; i < _paint->ObjectsCount; i++)
{
hobj = _paint->GetObjFromIndex(i);
if (_paint->ObjID[hobj] == _boxID)
Add(hobj);
}
}
//--------------------------------------------------------------------------
TIERectangle TAssistor::GetObjRect(int val)
{
TIERectangle rect;
if (_hAssistorObject)
{
int hobj = _hAssistorObject[val];
rect.x = _paint->ObjLeft[hobj];
rect.y = _paint->ObjTop[hobj];
rect.width = _paint->ObjWidth[hobj];
rect.height = _paint->ObjHeight[hobj];
}
else
{
rect.width = 0;
rect.height = 0;
}
return rect;
}
//--------------------------------------------------------------------------
// event
//--------------------------------------------------------------------------
void __fastcall TAssistor::NewBox(TObject *Sender, int hobj)
{
_paint->ObjID[hobj] =  _boxID;
collectBoxes();
}

Моя попытка Delphi assistor.pas

unit assistor;

interface

uses
Winapi.Windows,
Winapi.Messages,
System.SysUtils,
System.Variants,
System.Classes,
Vcl.Graphics,
Vcl.Controls,
Vcl.Forms,
Vcl.Dialogs,
Vcl.StdCtrls,
Vcl.ExtCtrls,
Vcl.ComCtrls,
System.Math,
//ImageEn
ievect,
hyiedefs,
//Orsa
OrsaDLL;

type
TAssistorType = (
astDummy,
astKeys,
astGrid,
astBox,
astMatch );

type
descContainer = record
kp: keypointsdata;
rect: TIERectangle;
end;

type
TDescContainer = class
constructor Create;
destructor Destroy;
public
Cell: array of descContainer;
CellSize: Integer;
procedure ClearCells;
procedure CreateCells( size : integer);
procedure Keys2Cell(var keyPoints : keypointsData; index : integer);
procedure Cell2Keys(var keyPoints : keypointsData; index : integer);
end;

type
TAssistor = class
private
_paint: TImageEnVect;
_hAssistorObject: Integer;
_hAssistorSize: Integer;
_hAssistorIndex: Integer;
_boxID: Integer;
_assType: TAssistorType;
procedure CollectBoxes;
procedure NewBox(Sender: TObject; hobj: Integer);
public
procedure Add( hobj : integer; anchorToLayer : Boolean);
procedure Delete;
procedure Show( full : Boolean);
procedure Hide( full : Boolean);
procedure CreateGrid( rows, cols, penSize : integer; penColor : TColor);
procedure CreateKeys( dscC : TDescContainer; sigma, penSize : integer; penColor : TColor);
procedure PrepareAddBox( penSize : integer; penColor, brushColor : TColor);
procedure PrepareMoveBox;
procedure DeleteBox;
function GetObjRect( val : integer):TIERectangle;
end;

implementation

procedure TDescContainer.ClearCells;
var
i : integer;
begin
if (Length( Cell ) > 0) then begin
for i := 0 to CellSize-1 do
begin
//delete []Cell[i].kp.Data;
dispose( Cell[i].kp.Data );       //<-- not sure if this is correct
Cell[i].kp.Data := 0;
end;
end;
//delete []Cell;    //<-- don't know what is Delphi equivalent
CellSize := 0;
end;procedure TDescContainer.CreateCells( size : integer);
var
i : integer;
begin
ClearCells();
CellSize := size;
for i := 0 to CellSize-1 do
begin
Cell[i].kp.Data := 0;
Cell[i].kp.Count := 0;
end;
end;procedure TDescContainer.Keys2Cell(var keyPoints : keypointsData; index :
integer);
var
i : integer;
begin
//if Cell[index].kp.Data then delete [] Cell[index].kp.Data;

if (Cell[index].kp.Data <> nil) then                  //<-- not sure if this is correct
dispose( Cell[index].kp.Data );                   //<-- not sure if this is correct
Cell[index].kp.Count := keyPoints.Count;
for i := 0 to keyPoints.Count-1 do;
Cell[index].kp.Data[i] := keyPoints.Data[i];       //<-- compiler complains - should Cell be an array of array of TDescContainer?
end;procedure TDescContainer.Cell2Keys(var keyPoints : keypointsData; index :
integer);
var
i : integer;
begin
if keyPoints.Count <> Cell[index].kp.Count then begin
if keyPoints.Count > 0 then
//delete [] keyPoints.Data;
dispose( keyPoints.Data );                 //<-- not sure if this is correct
keyPoints.Count := Cell[index].kp.Count;
end;
for i := 0 to keyPoints.Count-1 do
keyPoints.Data[i] := Cell[index].kp.Data[i];
end;

{ TAssistor }

procedure TAssistor.Add( hobj : integer; anchorToLayer : Boolean);
begin
if _hAssistorIndex < _hAssistorSize then begin
//_hAssistorObject[PostInc(_hAssistorIndex)] := hobj;
_hAssistorObject[Inc(_hAssistorIndex)] := hobj;       //<-- not sure if this correct

if anchorToLayer then _paint.ObjLayer[hobj] := _paint.LayersCurrent;
end;
end;procedure TAssistor.Delete;
var
i: Integer;
begin
//if _hAssistorObject then begin
if Assigned(_hAssistorObject) then begin   //<-- not sure if this is correct
for i := 0 to _hAssistorSize - 1 do begin
//PostDec(i);
Dec(i);                   //<-- not sure if this is correct
_paint.RemoveObject(_hAssistorObject[i]);
end;
//delete [] _hAssistorObject;      //<-- don't know Delphi equivalent
_hAssistorObject := 0;
_hAssistorSize := 0;
_hAssistorIndex := 0;
end;
end;procedure TAssistor.Show( full : Boolean);
var
i : integer;
begin
//if _hAssistorObject then begin
if Assigned(_hAssistorObject) then begin     //<-- not sure if this is correct
for i := 0 to _hAssistorSize-1 do
begin
if full then
_paint.ObjStyle[_hAssistorObject[i]] := [ievsSelectable, ievsVisible,
ievsMoveable, ievsSizeable]
else
_paint.ObjStyle[_hAssistorObject[i]] := [ievsVisible];
end;
end;
end;procedure TAssistor.Hide( full : Boolean);
var
i : integer;
begin
if full then begin
_paint.MouseInteractVt := [];    // disable all interactions
_paint.OnNewObject := 0;         // disable events
end;
//
//if _hAssistorObject then begin
if Assigned(_hAssistorObject) then begin    //<-- not sure if this is correct
for i := 0 to _hAssistorSize-1 do
_paint.ObjStyle[_hAssistorObject[i]] := [];
end;
end;procedure TAssistor.CreateGrid( rows, cols, penSize : integer; penColor :
TColor);
var
hobj,
iWidth,
iHeight    : integer;
tileWidth,
tileHeight,
curX,
curY       : Double;
i,
j          : integer;
begin
_assType := astGrid;
Delete();
// create grid as bunch of boxes so it can be converted to sizable boxes if
necessary
iWidth := _paint.IEBitmap.Width;
iHeight := _paint.IEBitmap.Height;
_hAssistorSize := cols * rows;
tileWidth := iWidth * 1.0 / cols;
tileHeight := iHeight * 1.0 / rows;
curY := 0;
for i := 0 to rows-1 do
begin
curX := 0;
for j := 0 to cols-1 do
begin
hobj := _paint.AddNewObject();
_paint.ObjKind[hobj] := iekBOX;
_paint.ObjBrushStyle[hobj] := bsClear;
_paint.ObjTop[hobj] :=  Round(curY);
_paint.ObjLeft[hobj] := Round(curX);
_paint.ObjWidth[hobj] := Round(tileWidth);
_paint.ObjHeight[hobj] := Round(tileHeight);
_paint.ObjPenWidth[hobj] := penSize;
_paint.ObjPenColor[hobj] := penColor;
_paint.ObjStyle[hobj] := [ievsVisible];
Add(hobj);
curX  := curX + tileWidth;
end;
curY  := curY + tileHeight;
end;
end;procedure TAssistor.CreateKeys( dscC : TDescContainer; sigma, penSize :
integer; penColor : TColor);
var
kpsSize, i, hobj, radius : integer;
key : ^keypoint;
j : integer;
begin
_assType := astKeys;
Delete();
kpsSize := 0;
for i := 0 to dscC.CellSize-1 do
kpsSize  := kpsSize + (dscC.Cell[i].kp.Count);
_hAssistorSize := kpsSize;
// show keypoints
for i := 0 to dscC.CellSize-1 do
begin
for j := 0 to dscC.Cell[i].kp.Count-1 do
begin
key := (dscC.Cell[i].kp.Data[j]);
hobj := _paint.AddNewObject();
radius := ceil(key.scale * sigma);  // initial sigma
_paint.ObjPenWidth[hobj] := penSize;
_paint.ObjPenColor[hobj] := penColor;
_paint.ObjBrushStyle[hobj] := bsClear;
_paint.ObjKind[hobj] := iekELLIPSE;
//paint.ObjTop[hobj] =  PaintView.IEBitmap.Height - 1 - (Round(kfDesc[i].x) - radius;
_paint.ObjTop[hobj] := key.y - radius + dscC.Cell[i].rect.y;
_paint.ObjLeft[hobj] := key.x - radius + dscC.Cell[i].rect.x;
_paint.ObjWidth[hobj] := radius*2;
_paint.ObjHeight[hobj] := radius*2;
_paint.ObjStyle[hobj] := [];
Add(hobj);
end;
end;
end;procedure TAssistor.PrepareAddBox( penSize : integer; penColor, brushColor :
TColor);
begin
_assType := astBox;
_paint.OnNewObject := NewBox;
_paint.ObjKind[IEV_NEXT_INSERTED_OBJECT] := iekBOX;
_paint.ObjBrushStyle[IEV_NEXT_INSERTED_OBJECT] := bsCross;
_paint.ObjBrushColor[IEV_NEXT_INSERTED_OBJECT] := brushColor;
_paint.ObjPenWidth[IEV_NEXT_INSERTED_OBJECT] := penSize;
_paint.ObjPenColor[IEV_NEXT_INSERTED_OBJECT] := penColor;
_paint.MouseInteractVt := TIEMouseInteractVt() shl miPutBox;
end;

procedure TAssistor.NewBox(Sender: TObject; hobj: Integer);
begin
_paint.ObjID[hobj] :=  _boxID;
collectBoxes();
end;

procedure TAssistor.PrepareMoveBox;
begin
_assType := astBox;
Show(true);
_paint.MouseInteractVt := TIEMouseInteractVt() shl miObjectSelect;
end;procedure TAssistor.DeleteBox;
var
i: Integer;
begin
for i := 0 to _paint.SelObjectsCount-1 do begin
//PostDec(i);
Dec(i);             //<-- not sure if this is correct

if _paint.ObjID[_paint.SelObjects[i]] = _boxID then
_paint.RemoveObject(_paint.SelObjects[i]);
end;
CollectBoxes();
end;procedure TAssistor.CollectBoxes;
var
i,
hobj,
numBoxes,
i        : integer;
begin
_assType := astBox;
//if _hAssistorObject then begin
if Assigned(_hAssistorObject) then begin   //<-- not sure if this is correct
//   delete [] _hAssistorObject;           //<-- don't know Delphi equivalent
_hAssistorObject := 0;
_hAssistorSize := 0;
_hAssistorIndex := 0;
end;
// collect boxes
numBoxes := 0;
for i := 0 to _paint.ObjectsCount-1 do
begin
hobj := _paint.GetObjFromIndex(i);
if _paint.ObjID[hobj] = _boxID then begin
//PostInc(numBoxes);
inc(numBoxes);              //<-- not sure if this is correct
end;
end;
_hAssistorSize := numBoxes;
// boxes
for i := 0 to _paint.ObjectsCount-1 do
begin
hobj := _paint.GetObjFromIndex(i);
if _paint.ObjID[hobj] = _boxID then Add(hobj);
end;
end;function TAssistor.GetObjRect( val : integer):TIERectangle;
var
rect : TIERectangle;
hobj : integer;
begin
//if _hAssistorObject then begin
if Assigned(_hAssistorObject) then begin   //<-- not sure if this is correct
hobj := _hAssistorObject[val];
rect.x := _paint.ObjLeft[hobj];
rect.y := _paint.ObjTop[hobj];
rect.width := _paint.ObjWidth[hobj];
rect.height := _paint.ObjHeight[hobj];
end
else
begin
rect.width := 0;
rect.height := 0;
end;
Result := rect;
end;

end.

Прошу прощения, если мой вопрос вызвал какие-то плохие чувства, что мой «дамп кода» был просто способом уйти с бесплатной помощью без какой-либо работы с моей стороны. Я намеревался извлечь уроки из моих ошибок, которые могут быть исправлены более опытными программистами, и я уверен, что многие читатели могут извлечь из этого пользу, особенно те, кто выполняет ту же задачу преобразования кода C ++ в Delphi. Такие сайты, как этот, дают нам возможность поделиться своим опытом и одновременно расширить свои знания.

Причина, по которой я поместил весь код в вопрос, была в том, что я хотел знать, правильно ли я сделал структуру преобразования класса C ++ в Delphi. Если бы я вынул из него фрагменты, я думаю, что было бы слишком запутанным, чтобы знать, что является головкой или хвостом кода.

Если предположить, что конверсия правильная, и я надеюсь, что кто-то укажет на любые ошибки, то области, в которых у меня есть серьезные неопределенности, находятся в этих областях:

  1. В коде C ++ Cell определяется как: descContainer * Cell. Я сделал Cell как массив TDescContainer в Delphi. Но в Key2Cell есть Cell [index] .kp.Data [i]: = keyPoints.Data [i], что заставило меня подумать, что это должен быть массив массива TDescContainer. Если я это сделал, то другие области Cell в коде вызывают проблемы. Итак, какое должно быть правильное определение Cell в этом случае?

  2. в ClearCells я написал преобразование кода C ++ для delete [] Cell [i] .kp.Data как dispose (Cell [i] .kp.Data). Это правильно? И что в этом случае будет Delphi-эквивалентом кода C ++ delete [] Cell?

  3. Являются ли C ++ PostInc и PostDec такими же, как Delphi’s Inc и Dec?

  4. В CollectBoxes я не уверен, каким должен быть _hAssistorObject. Я определил как целое число в Delphi, но код C ++ if (_hAssistorObject)
    {
    delete [] _hAssistorObject смущает меня. Правильно ли это в Delphi, если я сделал это: если Assigned (_hAssistorObject) затем начнется, и что в Delphi эквивалентно удалению [] _hAssistorObject в этом случае?

Еще раз спасибо всем заранее за то, что вы выбрали свой мозг. Я искренне надеюсь, что этим никому не испортил никому выходные.

1

Решение

Задача ещё не решена.

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector