The snippet of code:
NSUInteger *lengthOfLine =100;
NSUInteger *half = lengthOfLine/2;
The compile error for line 2:
Invalid operands to binary expression ('NSUInteger *' (aka 'unsigned long *') and 'int')
you should use NSUInteger
, not NSUInteger *
. NSUInteger
is a primitive type, not a subclass of NSObject
. Now you're dealing with a pointer to NSUInteger