Vector filling and resizing
<p>I'm working on a map generator. I'm using a 2-d vector to keep the data.</p>

<p>Header:</p>

<pre><code>class MapGenerator
{
public:
     ...
protected:
    std::vector&lt; std::vector&lt;int&gt; &gt; map;
...
}
</code></pre>

<p>It's size is known once the MapGenerator is instanciated, I was wondering if there was a cleaner way to size it properly and fill it with 0's than what I currently do :</p>

<pre><code>MapGenerator::MapGenerator(int dimensionX, int dimensionY) 
: dimensionX(dimensionX), dimensionY(dimensionY)
{
    map.resize(dimensionX);

    for(int i = 0 ; i &lt; map.size() ; i++)
    {
       map[i].resize(dimensionY);
       fill(map[i].begin(), map[i].end(), 0);
    }

}
</code></pre>

<p>This code work's fine, but if there's a cleaner or more optimal approach I'd like to know. I'm using GCC under MinGW and I don't think I have C++ 11 enabled.</p>
