heh, funny thing you asked this, just this morning I was working on an engineering assignment for c++, and had to declare a dynamic 2d array.
I used vectors to do it, as I find them easier to pass to procedures, not exactly what you need, but I can give you the code if you like.