收起
数组长度不能用变量,需要用常量,执意要用变量的,可以考虑用vector,如vector<int> a(n);或者使用动态分配数组的方式,c++可以用 int *a = new int[n];
vector<int> a(n);
int *a = new int[n];
报告相同问题?