I am facing this error while executing my program.
"bad operand types for binary operator '^' first type:int second type:int[]"
int temp1;
for(int m = 1;m<height;m++)
{
temp1 = 2*m-1;
for(int n = 0;n<width;n++)
{
r[temp1][n] = r[temp1][n]^Kc[n];
}
}
This will help me alot, Thanks.
You can apply the^
operator on two int
s, not on an int
and an int
array.
Based on the error message, Kc[n]
is an array of int
.
You can apply the operator on two int
s :
r[temp1][n] = r[temp1][n]^Kc[temp1][n];
I have no idea if the indices make sense (since I don't know the dimensions of the 2 arrays), so you might have to change them.