Небольшой вопрос с переводом на С++

'FaTsO'
Дата: 08.10.2006 12:03:39
Не могли бы вы мне помочь перевести это на С++
type
  TColorMatrix = array of array of TColor;

TImg = class(TObject)
  private
    FPixels: TColorMatrix;
    function GetPixel(X, Y: Integer): TColor;
    procedure SetPixel(X, Y: Integer; Color: TColor);
  public
    constructor Create(ALeft, ATop, ARight, ABottom: Integer); overload;
    constructor Create(ClipRect: TRect); overload;
    constructor Load(const Canvas: TCanvas);
    destructor Destroy; override;
Просто не мог найти никак как перевести первые 2 строчки (Там где про TColorMatrix) и не могу понять что делать с конструкторами т.к. в С++
их вроде как нужно называть только так же как и сам класс.

Заранее спасибо
Dmitrii K.
Дата: 08.10.2006 15:00:10
1) Почему бы не использовать уже имеющиеся?
2) Если та нужно своё, но почему бы не отнаследоваться от TGraphicControl?

3) Если 1 и 2 не подходит:
typedef TColor** TColorMatrix;

class TImg : public TObject
{
    TColorMatrix **FPixels;
    TColor GetPixel(int x,int y);
    void SetPixel(int x,int y,TColor Color);
    public:
    TImg(int left, int top, int right, int bottom);
    TImg(TRect ClipRect);
    TImg(const TCanvas Canvas);
    virtual __fastcall ~TImg();
};