How to write a "List<int[,]>" in C++?
<p>I'm attempting to make a C++ equivalent code of the following C# code, mainly because I'm following a tutorial that is in C#, and I'm more comfortable using C++. My thought process is maybe making an outer array, then allocating a new array into each index that represents a matrix size. Would this be okay or is there a better way to go about implementing this in C++?</p>

<pre><code>// current C# code
List&lt;int[,]&gt; pieces;

pieces = new List&lt;int[,]&gt;();

/* I Piece */
pieces.Add(new int[4, 4] {
    {0, 0, 0, 0},
    {1, 1, 1, 1},
    {0, 0, 0, 0},
    {0, 0, 0, 0}
});

/* J Piece */
pieces.Add(new int[3, 3] {
    {0, 0, 1},
    {1, 1, 1},
    {0, 0, 0}
});

/* O Piece */
pieces.Add(new int[2, 2] {
    {1, 1},
    {1, 1}
});

/* S Piece */
pieces.Add(new int[3, 3] {
    {0, 1, 1},
    {1, 1, 0},
    {0, 0, 0}
});


/* T Piece */
pieces.Add(new int[3, 3] {
    {0, 1, 0},
    {1, 1, 1},
    {0, 0, 0}
});

/* Z Piece */
pieces.Add(new int[3, 3] {
    {1, 1, 0},
    {0, 1, 1},
    {0, 0, 0}
});
</code></pre>

<p>My initial code is making a matrix in an array. Since I'm not looking to change the number of "pieces" in the game itself, then a fixed array should be fine. So this is what I wrote as an equivalent. Obviously, it didn't work, saying it cannot be assigned to an entity of int:</p>

<pre><code>int pieces [7];

//I piece
pieces [0] = new int [4][4];
pieces [0] = {
                {0, 0, 0, 0},
                {1, 1, 1, 1},
                {0, 0, 0, 0},
                {0, 0, 0, 0}
             }

/* And so on for each piece */
</code></pre>
