Some programmers seem to violently hate them, while others seem to think they\'re fine. I know that anything that can be done to a multi-dimensional array can also be done to a
Do you need to store multi-dimensional data where you know the dimensions ahead of time? If so, use a multi-dimensional array.
If you don't know the dimensions ahead of time (i.e., you're going to have to dynamically allocate the array), then you either need to either
It depends on the specific use case, but as a rule of thumb, I almost always prefer the former because it makes for less memory management hassle and fewer heap allocations. The complexity for both approaches grows as the number of dimensions increases, but, in my opinion, it grows much faster for the latter approach due to the extra levels of indirection.