Is there a max array length limit in C++?

后端 未结 12 1684
深忆病人
深忆病人 2020-11-22 07:21

Is there a max length for an array in C++?

Is it a C++ limit or does it depend on my machine? Is it tweakable? Does it depend on the type the array is made of?

12条回答
  •  旧巷少年郎
    2020-11-22 08:19

    One thing I don't think has been mentioned in the previous answers.

    I'm always sensing a "bad smell" in the refactoring sense when people are using such things in their design.

    That's a huge array and possibly not the best way to represent your data both from an efficiency point of view and a performance point of view.

    cheers,

    Rob

提交回复
热议问题