title: What are the reasons why neither C++ nor STL includes multidimensional arrays?
body: <p>I understand their lack in C: one can mimic multidimensional arrays as arrays of arrays with no overhead. However, in C++ containers such as <code>vector</code> are not well suited for that. Although one can, and (alas) usually does something like <code>vector&lt; vector&lt; double &gt; &gt;</code>, such constructions may lead to:</p>
  
  <p>(1) Maintenance problem, such as lack of a guarantee that all inner <code>vector</code>s have the same size;</p>
  
  <p>(2) Significant memory overhead, such as multiple instances of inner vector size and data pointer;</p>
  
  <p>(3) Significant performance drawbacks, due to lack of spacial alignment between rows and necessity to do one more indirect memory access per row than necessary.</p>
  
  <p>Why make every developer reinvent the wheel by coding his own <code>grid</code> or <code>matrix</code>? </p>