title: Multidimensional variable size array in C++
body: <p>hi I want to do something like this:</p>
  
  <pre><code>int op(string s1, string s2){
      int x = s1.size();
      int y = s2.size();
      int matrix = new int[x][y]
      /* do stuff with matrix */
  }
  </code></pre>
  
  <p>For some reason I get the following errors:</p>
  
  <pre><code>SuperString.cpp(69) : error C2540: non-constant expression as array bound
  SuperString.cpp(69) : error C2440: 'initializing' : cannot convert from 'int (*)[1]' to 'int'
          This conversion requires a reinterpret_cast, a C-style cast or function-style cast
  SuperString.cpp(71) : error C2109: subscript requires array or pointer type
  </code></pre>
  
  <p>Thanks!</p>