title: What can be the best approach to store 2D array of Objects?
body: <p>I want to store C++ objects in MxN table, and I want to create the Object like:</p>
  
  <pre><code>Vector2D&lt;MyObject*&gt; objects = new Vector2D&lt;MyObject*&gt;(M,N);
  MyObject* obj = new MyObject;
  objects.add(i,j, obj);
  </code></pre>
  
  <p>And later on, I should access the items in similar way.
  Please suggest me the best ideas, not just the ways. I know few of them. :)</p>
  
  <p>EDIT:
  Basically what i need is, Just allocate memory for MxN grid of generic Object. Just add/retrieve the items with the given row and Column.</p>