Question

So, i'm trying to create and initialize a TShape object in a derivate file and I get E2280 Member identifier expected. Here is the code

#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;
}
Was it helpful?

Solution

This syntax is wrong:

Forma->new TShape(MainWindow_Form);

It looks like you need

Forma = new TShape(MainWindow_Form);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top