from_shamu
May 11th, 1999, 03:26 PM
Could some one please send me a sample code about allocating memory for 3-D int array
dynamically ?
thanks for the help !!
ccl
dynamically ?
thanks for the help !!
ccl
|
Click to See Complete Forum and Search --> : memory allocation from_shamu May 11th, 1999, 03:26 PM Could some one please send me a sample code about allocating memory for 3-D int array dynamically ? thanks for the help !! ccl May 11th, 1999, 07:55 PM Hi Shamu, int (*pData)[4][5]; pData=new int[3][4][5];//imagine this as 3 pages of a 4 * 5 integer matrix pData[0][0][0]=0;//assigning a value of zero to the element in the //first page ,first row,first col. so shamu....does this help? -Raj(MohanR@bsci.com) codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |