title: Best way to represent a 2-D array in C++ with size determined at run time
body: <p>In C++ I'd like to do something like:</p>
  
  <pre><code>int n = get_int_from_user();
  
  char* matrix = new char[n][n];
  
  matrix[0][0] = 'c';
  //...
  matrix[n][n] = 'a';
  
  delete [][] matrix;
  </code></pre>
  
  <p>but of course this doesn't work.  What is the best way to do something similar?  I've seen some solutions to this but they seem pretty messy.</p>