int **cells;
//allocate memory
cells = new int*[rows];
for(int i=0; i<rows; i++){
cells[i] = new int[columns];
}
//clean up
if(cells){
for(int i=0; i<rows; i++){
if(cells[i]){
delete[] cells[i];
}
}
delete[] cells;
}
portfolio, showcase, experiments & tech repository
No comments:
Post a Comment