I'm sure I've got a basic problem in my C knowledge. I have one variable defined in the @interface
:
uint * theBytes;
and then I have a method for checking the values of that array.
- (IBAction) checkNow {
NSLog(@"now? %d %d %d", theBytes[0], theBytes[1], theBytes[2]);
}
- (void)viewDidLoad {
[super viewDidLoad];
uint tryThis[3] = {72,2,244};
theBytes = tryThis;
[self checkNow];
}
The initial checkNow
displays the values fine. If I call checkNow
on a button press later, the values are totally different and strange.
I can do this with NSData
quite easily, but I'd like to do it with straight arrays.