The following is the method signature in a class.
virtual void evaluate(const double *var, double *obj, double *constr) const = 0;
virtual void evaluate(unsigned int numPoints, const double **var, double **obj, double **constr) const {
//do something
}
Here is the declaration of arguments
unsigned int size;
double **var = new double*[size];
double **obj = new double*[size];
double **constr = new double*[size];
Here is the method call.
evaluator.evaluate(size, var, obj, constr);
I get the following compiler error.
foo.cpp: In member function âvoid foo::evaluatePopulation(std::vector<Individual, std::allocator<Individual> >&, unsigned int, bool)â:
foo.cpp:347: error: no matching function for call to foo::evaluate(unsigned int&, double**&, double**&, double**&) constâ
foo.h:35: note: candidates are: virtual void foo::evaluate(const double*, double*, double*) const
foo.h:43: note: virtual void foo::evaluate(unsigned int, const double**, double**, double**) const <near match>
foo
are class names. I am using double pointers (two asterisks). How do I resolve this error?