我有一个结构类型
typedef struct {
Point CellLocation;
enumCell isOccupied;
Node* coveringStation;
vector< pair<float,Node*> > coveredBy;
} Cell;
然后尝试使用动态输入声明二维单元格数组,例如:
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];
我究竟做错了什么?