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

前端 未结 9 910
北海茫月
北海茫月 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:35

    There are following advantages of multi-dimensional arrays over Vector>:

    • They are easy to understand.
    • Searching and sorting of elements can be done very easily.
    • They are compatible with C.
    • They are easy to type.

提交回复
热议问题