Creating multidimensional array on the heap
What is the right way to create a mutlidimensional array in C on the heap. Suppose I want an array with dimension 100x90x80 int arr; would create it on the stack. How can I create it on the heap so I can use it the same way (as if it was on the stack). Should i use malloc? In what way? (I can't cast the returned pointer without getting compile error). Or new? How to correctly deallocate it?