Hi people I have the error I named the question in the function: (With "here" I comment where the compiler send me the error):

Code:

oid ftshifting(matriz filter,int rows,int cols){
double r2,c2,tmp1_3,tmp2_4;
r2 = (rows+1)/2;
c2 = (cols+1)/2;
for (int i = 0; i<rows/2; i++){
for (int k = 0; k<cols/2; k++){
tmp1_3 = filter[i][k];
filter[i][k] = filter[i+r2][k+c2]; //error
filter[i+r2][k+c2] = tmp1_3; //error
tmp2_4 = filter[i+r2][k]; //error
filter[i+r2][k] = filter[i][k+c2]; //error
filter[i][k+c2] = tmp2_4; //error
}
}
}
double **createmat(int rows,int cols){
double **m;
m=new double*[rows];
for(int i=0;i<rows;i++)
m[i]=new double[cols];
return m;
}

The strange thing is that it worked before inserting the typedef double**matriz;

I tested the function and it worked. Also, other function use this data and it works normally, example: (no errors at compiler time)

Code:

void pre_filter_Computations(matriz radius,matriz theta,int cols,int rows){
double X[rows][cols],Y[rows][cols];
double x[cols],y[rows];
double epsilon = 0.0001;
for(int i=0;i<cols;i++){
x[i]=((double)(i-cols)/2)/((double)cols/2);
}
for(int z=0;z<rows;z++){
y[z]=-(((double)(z-rows)/2)/((double)rows/2));
}
for(int m=0;m<cols;m++){
for(int n=0;n<rows;n++){
X[m][n]=x[m];
Y[m][n]=y[n];
}
}
for(int a=0;a<rows;a++){
for(int b=0;b<cols;b++){
X[a][b] = pow(X[a][b],2);
Y[a][b] = pow(Y[a][b],2);
X[a][b] = X[a][b] + Y[a][b];
radius[a][b] = sqrt(X[a][b]);
}
}
radius[rows/2][cols/2]=1;
for(int a=0;a<rows;a++){
for(int b=0;b<cols;b++){
radius [a][b]= radius[a][b] + epsilon;
theta[a][b] = atan2(Y[a][b],X[a][b])*180/PI;
}
}
}

agrees : Not to mention all the duplicates of those threads on other forums as well