c++程序出错了
staticdoubleBOUND[6][2],WH[16][2],WO[5][16];staticdoubleOBJECTIVE[31][5],q[31],CHROMO...
static double BOUND[6][2],WH[16][2],WO[5][16];
static double OBJECTIVE[31][5], q[31], CHROMOSOME[31][16];
static void Simu(double x[802][2],double y[802][5]);
static void Input_Output(double x[2],double y[5]);
static void Train(double original_x[802][16],double original_y[802][5],
double standard_x[802][16],double standard_y[802][5]);
static void Standarlize(double original_x[802][2],double original_y[802][5],
double standard_x[802][2],double standard_y[802][5]);
static void BPA(double standard_x[802][2],double standard_y[802][5]);
static void Init_NN(void);
static void NN(double x[2],double y[5]);
static void Init_GA(void);
static void evaluation(int gen);
static void selection(void);
static void crossover(void);
static void mutation(void);
static void Objectives(void);
static int constraint_check(double x); //约束检测
static void Input_Output(double x[N+1],double y[O+1])
E:\mywork\pingtai\widget.cpp:58: error: array bound is not an integer constant before ']' token
static void Input_Output(double x[N+1],double y[O+1])
E:\mywork\pingtai\widget.cpp:58: error: array bound is not an integer constant before ']' token
static void Input_Output(double x[N+1],double y[O+1])
^
E:\mywork\pingtai\widget.cpp:58: error: array bound is not an integer constant before ']' token
static void Input_Output(double x[N+1],double y[O+1])
^
怎么解决啊,在线等 ^ 展开
static double OBJECTIVE[31][5], q[31], CHROMOSOME[31][16];
static void Simu(double x[802][2],double y[802][5]);
static void Input_Output(double x[2],double y[5]);
static void Train(double original_x[802][16],double original_y[802][5],
double standard_x[802][16],double standard_y[802][5]);
static void Standarlize(double original_x[802][2],double original_y[802][5],
double standard_x[802][2],double standard_y[802][5]);
static void BPA(double standard_x[802][2],double standard_y[802][5]);
static void Init_NN(void);
static void NN(double x[2],double y[5]);
static void Init_GA(void);
static void evaluation(int gen);
static void selection(void);
static void crossover(void);
static void mutation(void);
static void Objectives(void);
static int constraint_check(double x); //约束检测
static void Input_Output(double x[N+1],double y[O+1])
E:\mywork\pingtai\widget.cpp:58: error: array bound is not an integer constant before ']' token
static void Input_Output(double x[N+1],double y[O+1])
E:\mywork\pingtai\widget.cpp:58: error: array bound is not an integer constant before ']' token
static void Input_Output(double x[N+1],double y[O+1])
^
E:\mywork\pingtai\widget.cpp:58: error: array bound is not an integer constant before ']' token
static void Input_Output(double x[N+1],double y[O+1])
^
怎么解决啊,在线等 ^ 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询