main.cpp: In function 'void median(double*, double*)':
main.cpp:210:30: error: invalid types 'double[int]' for array subscript
if(parasim_j[i][h]>parasim_j[i+1][h]){
^
main.cpp:210:48: error: invalid types 'double[int]' for array subscript
if(parasim_j[i][h]>parasim_j[i+1][h]){
^
main.cpp:211:17: error: 'temp' was not declared in this scope
temp=parasim_j[i][h];
^~~~
main.cpp:211:36: error: invalid types 'double[int]' for array subscript
temp=parasim_j[i][h];
^
main.cpp:212:31: error: invalid types 'double[int]' for array subscript
parasim_j[i][h]=parasim_j[i+1][h];
^
main.cpp:212:49: error: invalid types 'double[int]' for array subscript
parasim_j[i][h]=parasim_j[i+1][h];
^
main.cpp:213:33: error: invalid types 'double[int]' for array subscript
parasim_j[i+1][h]=temp;
^
main.cpp:218:42: error: 'j' was not declared in this scope
median_parasim_j[h] = (parasim_j[j-1][h]+parasim_j[j][h])/2;
^
main.cpp: At global scope:
main.cpp:223:30: error: 'nsim' was not declared in this scope
void storages(double parasim[nsim][npara],double likesim[nsim],double postsim[nsim],double &nsim,double &npara,int pshape[2],double pmean[2],double psdd[2],int pmask[2],int pmaskinv[2],int pfix[2],double Y[nT],double X[nT],double paraold[2],double postold,double likeold){
^~~~
main.cpp:223:36: error: 'npara' was not declared in this scope
void storages(double parasim[nsim][npara],double likesim[nsim],double postsim[nsim],double &nsim,double &npara,int pshape[2],double pmean[2],double psdd[2],int pmask[2],int pmaskinv[2],int pfix[2],double Y[nT],double X[nT],double paraold[2],double postold,double likeold){
^~~~~
main.cpp:223:42: error: expected ')' before ',' token
void storages(double parasim[nsim][npara],double likesim[nsim],double postsim[nsim],double &nsim,double &npara,int pshape[2],double pmean[2],double psdd[2],int pmask[2],int pmaskinv[2],int pfix[2],double Y[nT],double X[nT],double paraold[2],double postold,double likeold){
^
main.cpp:223:43: error: expected unqualified-id before 'double'
void storages(double parasim[nsim][npara],double likesim[nsim],double postsim[nsim],double &nsim,double &npara,int pshape[2],double pmean[2],double psdd[2],int pmask[2],int pmaskinv[2],int pfix[2],double Y[nT],double X[nT],double paraold[2],double postold,double likeold){
^~~~~~
main.cpp: In function 'void moment(double, double, double, double)':
main.cpp:318:37: error: invalid type argument of unary '*' (have 'double')
double nsim=sizeof(irf)/sizeof(*irf);
^~~
main.cpp:319:22: error: invalid type argument of unary '*' (have 'double')
double H=sizeof(*irf)/sizeof(**irf);
^~~
main.cpp:319:36: error: invalid type argument of unary '*' (have 'double')
double H=sizeof(*irf)/sizeof(**irf);
^~~
main.cpp:321:17: error: cannot convert 'double' to 'double*' for argument '1' to 'void median(double*, double*)'
median(y,irf);
^
main.cpp:323:21: error: size of array 'temp' has non-integral type 'double'
double temp[nsim];
^
main.cpp:328:9: error: 'h' was not declared in this scope
for(h=0;h<H;h++){
^
main.cpp:329:13: error: 'i' was not declared in this scope
for(i=0;i<nsim;i++){
^
main.cpp:332:23: error: invalid operands of types 'double [1]' and 'double' to binary 'operator+'
sort(temp,temp+nsim);
~~~~^~~~~
main.cpp:332:9: error: 'sort' was not declared in this scope
sort(temp,temp+nsim);
^~~~
main.cpp:332:9: note: suggested alternative: 'qsort'
sort(temp,temp+nsim);
^~~~
qsort
main.cpp:333:13: error: 'i' was not declared in this scope
for(i=0;i<nsim;i++){
^
main.cpp:336:23: error: invalid types 'double[int]' for array subscript
y05[h]=irf[n05][h];
^
main.cpp:337:23: error: invalid types 'double[int]' for array subscript
y95[h]=irf[n95][h];
^
main.cpp:344:39: error: invalid type argument of unary '*' (have 'double')
double H=sizeof(*wshock)/sizeof(**wshock);
^~~~~~
main.cpp:345:23: error: invalid type argument of unary '*' (have 'double')
double n=sizeof(**wshock)/sizeof(***wshock);
^~~~~~
main.cpp:345:41: error: invalid type argument of unary '*' (have 'double')
double n=sizeof(**wshock)/sizeof(***wshock);
^~~~~~
main.cpp:347:20: error: size of array 'y05' has non-integral type 'double'
double y05[H][n];
^
main.cpp:347:20: error: size of array 'y05' has non-integral type 'double'
main.cpp:347:20: error: declaration of 'double y05 [1][1]' shadows a parameter
main.cpp:348:20: error: size of array 'y20' has non-integral type 'double'
double y20[H][n];
^
main.cpp:348:20: error: size of array 'y20' has non-integral type 'double'
main.cpp:348:20: error: declaration of 'double y20 [1][1]' shadows a parameter
main.cpp:349:12: error: declaration of 'double y50' shadows a parameter
double y50=median(wshock);
^~~
main.cpp:349:29: error: too few arguments to function 'void median(double*, double*)'
double y50=median(wshock);
^
main.cpp:350:20: error: size of array 'y80' has non-integral type 'double'
double y80[H][n];
^
main.cpp:350:20: error: size of array 'y80' has non-integral type 'double'
main.cpp:350:20: error: declaration of 'double y80 [1][1]' shadows a parameter
main.cpp:351:20: error: size of array 'y95' has non-integral type 'double'
double y95[H][n];
^
main.cpp:351:20: error: size of array 'y95' has non-integral type 'double'
main.cpp:351:20: error: declaration of 'double y95 [1][1]' shadows a parameter
main.cpp:353:5: error: 'sort' was not declared in this scope
sort(wshock,wshock+100000);
^~~~
main.cpp:355:5: error: 'n05' was not declared in this scope
n05=floor(0.05*nsim+0.5);
^~~
main.cpp:358:5: error: 'n20' was not declared in this scope
n20=floor(0.2*nsim+0.5);
^~~
main.cpp:361:5: error: 'n80' was not declared in this scope
n80=floor(0.8*nsim+0.5);
^~~
main.cpp:364:5: error: 'n95' was not declared in this scope
n95=floor(0.95*nsim+0.5);
^~~
... |