-
except you dont need a vector<vector<Tile*>> you could possibly use a vector<Tile*> but then again, you gain nothing by doign this AFAIK. I am assumign the number of terrain types is constant, and the only reason to use an array or vector is to speed up the terrain loop by replacing the switch statement with an index calculation. I havent tested the speed of indexing into a vector<> versus an array, but at best it would be the same speed so you gain nothing and lose stability, since a vector<> will tend to go out of scope without safeguards, while a dynamically allocated array will not.
-
Dynamic allocations is prone to memory leaks. And if you don't need a dynamic array, you can just as well use boost::array (or std::tr1::array), which is static. Boost::array even asserts if you access an element that does not exist.
And the vector is a replacement tool for allocating big arrays of pointer-to-pointers, and the need for new for such a thing.