You're using C++, don't use malloc, use new.
... and to answer the question:
The Boost Multidimensional Array Library (Boost.MultiArray)
If you don't know Boost, you should definitely take a look at it. It has some really great stuff, some of which is going to be included in the next C++ standard.