Invalid types 'int[int]' for array subscript - multi-dimensional array : <p>I'm getting an " Invalid types 'int[int]' for array subscript error ".
 I searched for the same, but the previously asked Q's involved objects. This is a simple snippet.</p>

<blockquote>
  <p>Code</p>
</blockquote>

<pre><code>    #include&lt;iostream&gt;
    #include&lt;cmath&gt;
    using namespace std;

   int main()
 {
 int *a;
 a = new int a[10][10];     //Line 8
  for(int z=0;z&lt;10;z++)
  {
        for(int y=0;y&lt;10;y++)
        {
            a[z][y]=y;                    // Line 13
            cout &lt;&lt;"\t"&lt;&lt;a[z][y]&lt;&lt;endl;   // Line 14
        }
  }
 return 0;
 }
</code></pre>

<blockquote>
  <p>Error</p>
</blockquote>

<ol>
<li><p>Line 8 error: expected ';' before 'a'</p></li>
<li><p>Line 13 error: invalid types 'int[int]' for array subscript</p></li>
<li>Line 14 error: invalid types 'int[int]' for array subscript</li>
</ol>
