Ok, I have this constructor:
Board::Board(int nRows, int nCols){
numRows=nRows;
numCols=nCols;
int** board=new int*[numRows];
for(int i=0; i<numRows; i++){
board[i]=new int[numCols];
for(int j=0; j<numCols; j++){
board[i] [j]=-1;
}
}
}
where board is an array of the number of rows where each item in the array points to an array of length of the number of columns, so this board is set up and initialized to values of -1. My question is how I'm supposed to implement my destructor for a case like this, I understand the concept of the creation of each array of pointers, but in destruction I'm still a little lost. Any help is appreciated!