I'm having problems with dynamic memory. I am trying to dynamically allocate a structure with a 3D array. Here is the parts of my code I need help with:
It says this as the error messageCode:class map { private: struct new_tile { ... }*tiles; ... } ... map::map(char *whichmap) { ... tiles = new new_tile[tilesacross][tilesdown][tilelayers]; ... }
54 maps.h
assignment to `map::new_tile *' from `map::new_tile (*)[((tilesdown - 1) + 1)][((tilelayers - 1) + 1)]'