0
How to free memory of dynamically allocated two dimensional array?
sample problem: int main { int** arr; arr =new int*[3]; for(int i=0; i<3; i++) arr[i]=new int[3]; }? How to free allocated memory with arr?
3 ответов
0
Thanks Hatsy Rei
- 1
Your sample problem writes to memory you didn't allocate. Why don't you use a vector< vector<int> >?