How do compilers treat variable length arrays

前端 未结 4 1765
自闭症患者
自闭症患者 2020-11-30 13:59

This might seem like a beginner\'s question, but I am interested in the way that a compiler normally creates arrays of variable-dimensions, like in the following program.

4条回答
  •  粉色の甜心
    2020-11-30 14:45

    No version of C++ allows variable length array. Only C99 allows it.

    GCC allows it as an extension.

提交回复
热议问题