Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Vulcan

Dynamic 3D array allocation

This topic is 6173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
Triple pointer, allocate outermost array (array of double pointers) and so on successively for each ''layer'' until you have allocated a linear array (after which there is nothing to do except initialize and use).

There was a recent thread on 2D array allocation, and a post there gave a description of how the technique was extensible to n-dimensions. I suggest you peruse it.

Share this post


Link to post
Share on other sites
Where did that post go, dude? I need to know how to pass a pointer to a multi-dimensional array to a function.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
The same way you pass the pointer of anything to a function? Use the & operator.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!