I'm writing a program (a random map generator, to be exact) that requires a 2D array to created base on two variables (for the map), height and width. These variables are to be decided at runtime, but the strange way of creating a pointer to a 2D array on the heap has me stumped since the lesser index has to be known. How would I do this with both indexes to be decided at runtime?