Hi Guys,

I know there is a lot to say on Wrapper and there are many threads but I really don't get it as a newbie in C++.

I am trying to use a minimization algorithm called by:

double Calibration::Calibrate() {
...
CSimplex NMS(3,TOL,MAX_ITER,&functionToMinize);
...
}

The thing is functionToMinize is a member function and it has to take only a vector<double> as argument.

So I thought of a Wrapper.

Something like this:

double Wrapper_To_Call_Calibration(vector<double> x)
{
return wrapp -> functionToMinize(x);
}

Obviously this doesn't work. How should I proceed?

Create another class Wrapper with:
attribut Calibration*
constructor that initialize my pointor to my Calibration class.
Then define a function Wrapper_To_Call_Calibration inside this class?

I tried this but it doesn't work.

Any help please? (but very simple help, I am not expert in C++)...

Thanks a lot guys