I'm working on a tile engine, and I want to have the maps in a .dat file. In order for minimum memory usage and maximum versatility, I thought I'd do something like this:
but when I compile that I get this error:Code:ifstream data; data.open("map.dat"); int mapw, maph; data >> mapw >> maph; int *map = new int[mapw][maph];
initialization to 'int *' from 'int[*][((maph - 1) + 1)]' lacks a cast
I'm running Dev-cpp, any ideas?