C++出现的,求解,该怎么解决
C++出现的,求解我是初学者,求expected constant expression是什么原因呀[解决办法]1,运行程序之前的窗口未
C++出现的,求解
我是初学者,求expected constant expression是什么原因呀
[解决办法]
1,运行程序之前的窗口未关闭
2,缺少头文件
3,缺少引导文件
如果以上解决不了 请把出错代码发出来
[解决办法]贴上代码看看
[解决办法]For example, if you want to define an array, you need constant expression for array size:
int n(10); // n is int but not constant
int array[n]; // this will fail, n needs to be constant expression
const int N(10); // N is constant
int array[N]; // no problem here
[解决办法]数组的下标需要是常量表达式 而不是变量