O'Reilly logo
  • LI WEI thinks this is interesting:

unless the variable size is marked const, the compiler will not be sure of its value at compile time. The C++ compiler cannot size the array at compile time, so it generates a compile time error.

From

Cover of Learning C++ by Creating Games with UE4

Note

编译器在变异的时候无法知道size的大小,只有在运行的时候size大小才能出来,除非你将其写成const.否则只有报错