how to make a n*n 2d dynamic array in c++

C++
int** a = new int*[rowCount];
for(int i = 0; i < rowCount; ++i)
    a[i] = new int[colCount];
Source

Also in C++: