How can I convert from a double ** to a const double**
I am using ROOT and with a deconvolution function. When running, I receive an error:
cannot initialize a parameter of type 'const Double_t **' (aka 'const double **') with an lvalue of type 'Double_t **'(aka 'double **')
I define the parameter as such:
Double_t ** resp = new Double_t * [ybins]; for (int f = 0; f < xbins ; f = f+1){ for (int i = 0; i < ybins; i = i+1){ resp[f][i] = hinr->GetBinContent(i+1,f+1); } }
respofybinsdouble*which are not initialised (resp[f]can be anything, but certainly does it not point to an array ofdoubles); then you assign toresp[f][i].constin the code snippet you have given us, so how did you get that error?