I found some code for allocating and deallocating a dynamic 2d array, I modified it for my program and everything seems to work as it should. However I saw a comment saying this code could cause some problems, but it did not say what problems. So, Will this code cause any problems and if so what?
Code:globalCO.pcode = new string*[HEIGHT*10]; for(int n = 0; n < HEIGHT*10; n++) { globalCO.pcode[n] = new string[WIDTH]; } for (int n=0; n<HEIGHT*10; n++) { delete [ ] globalCO.pcode[n]; }



LinkBack URL
About LinkBacks



