Is it bad practice to use multi-dimensional arrays in C/C++?

前端 未结 9 889
北海茫月
北海茫月 2021-02-07 04:46

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

9条回答
  •  清歌不尽
    2021-02-07 05:31

    If multidimensional index computation bugs you, std::valarray with std::slice is the standard abstraction.

提交回复
热议问题