Dynamic matrix

I want to create 2D array, that’s wrong with this code?

A vector is a one-dimensional array.