私は構造体型を持っています
typedef struct {
Point CellLocation;
enumCell isOccupied;
Node* coveringStation;
vector< pair<float,Node*> > coveredBy;
} Cell;
次に、次のような動的入力を使用して、セルの 2D 配列を宣言しようとします。
this->Height = par("Height");
this->Width = par("Width");
Cell **c;
c = new Cell*[Width];
for (int i = 0; i < Width; i++)
Cell[i]= new Cell[Height];
私はこの出力を得ます:
error: expected unqualified-id before ‘[’ token
on Cell[i]= new Cell[Width];
私は何を間違っていますか?