I am trying to run my code in Visual Studio 2015, and I get next errorexpression must have a constant valueon double x1[dim];in next code snipped.
double fitness(const double x[], const int &dim) {
double sum = 0.0;
double x1[dim];
...
return sum;
}
The same code runs without an error on g++ 4.8. So how can I do the same thing under Visual Studio 2015.
Is my problem with compiler or code implementation?