CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    2

    memory allocation


    Could some one please send me a sample code about allocating memory for 3-D int array
    dynamically ?

    thanks for the help !!

    ccl



  2. #2
    Guest

    Re: memory allocation

    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([email protected])


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured