int nCnt = 3; //new int** n = new int* [nCnt]; for (int i = 0; i < nCnt; i++) { n[i] = new int[nCnt]; } //delete for (int i = 0; i < nCnt; i++) { delete[] n[i]; } delete[] n;