3D array C++ using int [] operator

Viewed 23057

I'm new to C/C++ and I've been cracking my head but still got no idea how to make an "structure" like this

alt text

It's supposed to be a 3D dynamic array using pointers.

I started like this, but got stuck there

  int x=5,y=4,z=3;
  int ***sec=new int **[x];

It would be enough to know how to make it for a static size of y and z;

Please, I'd appreciate that you help me.

Thanks in advance.

7 Answers
Related