title: Passing a dynamic multidimensional array on the stack to a function C++
body: <p>I've just been to an exam at local uni and they asked me to do basically a pathfinder. I got stuck, because I really wanted to pass a two-dimensional array to a function. I haven't come up with the idea of double pointer with heap allocation, but now that I think of it, it seems really ugly to not be able to pass it like
  <code>int function(int matrix[][]);</code> or maybe <code>int function(int&amp; matrix[][]);</code> something like that. What's the logic behind that restriction? Is there any way to do that on stack without <code>malloc</code>?<br>
  <em>EDIT</em> <br>
  The array is dynamic, and I was restricted from using any wrappers, including those from standard library</p>