invalid operands to binary + (have ‘double *’ and ‘double’)
<p>I am getting this error again and again what does it mean.
2dtransient_CN.c:359:131: error: invalid operands to binary + (have ‘double *’ and ‘double’)
This error is coming  in this given below code
*subroutine inidat<br>
 ******************************************************************/</p>

<pre><code>void inidat(int nx, int ny, double *u1, double *u2, double *A, double *B) {
int i, j, ij;
//initial condition
for (i = 0; i &lt;= nx-1; i++){
for (j = 0; j &lt;= ny-1; j++){
ij = i*ny+j;
u1[ij]=0;
u2[ij]=0;
B[ij]=0;
A[ij]=0;
     }

//Defining coefficient matrix A
for (i = 0; i &lt;= nx-1; i++){
for (j = 0; j &lt;= ny-1; j++){
ij = i*ny+j;
if (ij&gt;=0 &amp;&amp; ij&lt;nx){    // Bottom B.C.
A[ij] = 1;
A[ij+nx] = -1;
B[ij] = 0;
         }
else if (ij&gt;=(ny-nx)){  // Top B.C.
A[ij] = 1;
A[ij-nx] = -1;
B[ij] = 0;
         }
else if ((ij%nx)==0 &amp;&amp; ij!=0 &amp;&amp; ij!=(ny-nx)){ // Left B.C.
A[ij] =  1;
A[ij+1] = -1;
B[ij] = 0;
         }
else if (((ij+1)%nx)==0 &amp;&amp; ij!=(ny-1) &amp;&amp; ij!=(nx-1)){ // right B.C.
A[ij] =  1;
A[ij-1] = -1;
B[ij] = 0;
         }
else{ // for interior points
A[ij-nx] = -0.5*diffusivity.cy;
A[ij-1] = -0.5*diffusivity.cx;
A[ij] = 1 + diffusivity.cx + diffusivity.cy;
A[ij+1] = -0.5*diffusivity.cx;
A[ij+nx] = -0.5*diffusivity.cy;
B[ij] = (*(u2+ij-1)+ *(u2+ij+1))*0.5*diffusivity.cx + *(u2+ij)*(1-diffusivity.cx-diffusivity.cy) + *((u2+ij+nx)+ *(u2+ij-nx))*0.5*diffusivity.cy;
         }
       }
     }
  }
}
</code></pre>

<p>/********************************
what should I change in this above code to resolve this error.</p>