所以,我正在尝试在派生文件中创建和初始化TShape对象,并且我希望得到E2280成员标识符。 这是代码
#include "Data.h"
#include "MainWindow.h"
#include <vcl.h>
class item{
public:
TShape *Forma;
TImage *Imagine;
TLabel *Denumire, *Set, *Stat, *Price, *Weight, *Effect, *Type, *ID;
TButton *Equip;
item(int k);
};
item::item(int k){
int pozitia_forma=k*130+5;
Forma->new TShape(MainWindow_Form);
Forma->Parent=MainWindow_Form->ScrollBox;
Forma->Height=130;
Forma->Width=370;
Forma->Top=pozitia_forma;
Forma->Left=5;
}
答案 0 :(得分:1)
这种语法错误:
Forma->new TShape(MainWindow_Form);
看起来你需要
Forma = new TShape(MainWindow_Form);