objective c - Invalid operands to binary -
I have a method to check weather or a number is odd:
< Code> - (BOOL) also number: (unsigned int *) x {if (x and 1) {return TRUE; } And {return false; }}
But whenever I compile it, I receive an error:
Invalid Operations for Binary%
So it is compiling as a modulus function in the assembly and is failing in any way, but if I use a modulus based function (arguably slow) then I get a single error!
Help me overgrowth
thanks - Oli
X
is an indicator that the modulo operator will not work on the indicator.
Return (* x & 1);
This points to the pointer, then returns the result of the module (putting the implication in a bell)
Comments
Post a Comment