所以,我正在尝试在派生文件中创建和初始化 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;
}
最佳答案
语法错误:
Forma->new TShape(MainWindow_Form);
看来你需要
Forma = new TShape(MainWindow_Form);
关于c++ - 尝试从另一个 .cpp 启动 TShape 时成员标识符预期错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23088973/