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 ints, 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 ints :
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.
The error message is saying that Kc[n] is an array of ints. It needs to be an int.
If you mean for Kc[n] to be an integer, you've miss-declared it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With