I have method(void DE(...) that finds parameters of function y=f(x, a, b...) based on some data points. When I want to use function, that has other number of arguments, I need to comment first function, write second function, add (X.PAR[i][1],..., X.PAR[i][n]) arguments of this function every time I use func(y, x, param_1....param_n). How can I make function f(double x1, x2,...xn)to be an argument of function DE, so i wont need to change my program for every other function?
double f(double x1, x2,...xn){
}
void DE(int n){
 double A[n];
 fill(A) //some function that makes up values
 cout<<f(A[0], A[1],...A[n-1]);//if I change number of arguments in f, I also need to change it here
}
 
    