xcode - Why is my integer increasing by multiples of 4? -
i have if statement this
@property (nonatomic) nsuinteger *thescore; if (hint.hidden) { thescore += (2); } else { thescore += (1); } nslog(@"score changed"); score.text = [nsstring stringwithformat:@"%d", thescore];
but instead of thescore increasing 2 or 1 it's increasing 8 or 4
any ideas?
because it's pointer integer, not integer itself. 4 size of integer.
change nsuinteger thescore, without *.
Comments
Post a Comment