int obstat<meastype,restype>::computeJack(restype (*func)(vector< vector<meastype> > *vals, void *para), void *para)
{
int nmeas=measurements.size();
- restype manymeans[nmeas];
+ restype *manymeans = new restype[nmeas];
result jackres;
jackres.val = 0;
computations.push_back(jackres);
+ delete [] manymeans;
+
return computations.size()-1;
}
restype (*measFunc)(vector<meastype> *preCalculated, vector<meastype> *excludedmeas, int nmeas, void *para),
void *para) {
int nmeas=measurements.size();
- restype manymeans[nmeas];
+ restype *manymeans = new restype[nmeas];
result jackres;
vector<meastype> preCalculated;
computations.push_back(jackres);
+ delete [] manymeans;
+
return computations.size()-1;
}