I build an array with help with this question: How do I declare a 2d array in C++ using new? Now, my question is, how do I delete it? I know it\'s a for loo
for
The same way you created it. If you have a 2D array, yourArray, that has rows number of rows.
yourArray
rows
for (int i = 0; i < rows; ++i) { delete [] yourArray[i]; } delete [] yourArray;