// to createmap = new fftile*[sizex];for(int col = 0; i < sizex; i++) map[col] = new fftile[sizey];// to deletefor(int col = 0; i < sizex; i++) delete[] map[col];delete[] map;
You'd still have to loop through all the tiles to initialize them since you can't call anything but a default constructor when you use new[]. But, you should be able to use map[x][y] to address a specific tile.
This is actually backwards from the way 'normal' arrays work however since they are in the form array[row][column] and not array[column][row], which is essentially what you're saying by having the x first. If that bothers you and you want this to act like a regular 2D array, then you need to swap sizey and sizex and write map[y][x].
[edited by - jaxson on September 13, 2002 12:57:15 AM]