在定义变量时,使用常量表达式进行初始化,例如:
const int SIZE = 10; int array[SIZE] = {0};
或者在定义变量时,使用constexpr关键字标记,例如:
constexpr int SIZE = 10; int array[SIZE] = {0};
上一篇:变量未设置或块变量未设置错误91。
下一篇:变量未使用。