January 3rd, 2013, 01:41 AM
looping thrrough 2D array ,
I have the following code which I got through one of the posts here
I wish to know how to traverse or loop through a dynamic 2D array using pointer to pointer as returned by the code above.
T **AllocateDynamic2DArray(int nRows,int nCols)
dynamicArray = new T*[nRows];
for(int i=0;i< nRows;i++)
dynamicArray[i] = new T[nCols];
void FreeDynamic2DArray( T ** dArray)
delete  *dArray;
delete  dArray;
like I would in a static T 2D array.
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.