You can't declare a dynamic array like that.
If it is to hold a map, and you are only going to resize it between levels, then the best way is to do this:
map_struct* map = NULL;
int map_width;
int map_height;
void AllocateMap(int width, int height)
{
// If map already exists, delete it
if (map)
delete[] map;
map_width = width;
map_height = height;
map = new map_struct[width*height];
}
map_struct& GetItem(int x, int y)
{
return map[y*map_width+x];
}
Use GetItem(x,y) to access an item in the array, and use AllocateMap(width,height) to create the map, and then to resize it.
Because GetItem returns a reference, you can assign to it too:
GetItem(0,0) = map_struct();