Non static const variable in array dimension

I wrote this function
Double_t myfunction(Double_t *x, Double_t *par)
Float_t xx =x[0];
Double_t f = TMath::Sqrt(par[0]*xx) + par[1];
return f;

and when i use this for a fit root give me the title’s error.
myfun.C (1.47 KB)

I cannot reproduce the problem with the file that you posted.



 Int_t n = 13;

with a compiled time constant, like

 static const Int_t n = 13;


it works.thanks