Hi,
I have an array and I need to find if 2 records are the same. I have this code so far, but it cannot tell me at which index number they are the same.
Code:
What is the code to find out which index number is equal.
Thanks
I have an array and I need to find if 2 records are the same. I have this code so far, but it cannot tell me at which index number they are the same.
Code:
Code:
marbelesreached = NO;
for(int i=0; i< [records count] ; i++){
if ([[[records objectAtIndex: i] valueForKey: @"marbles"] intValue] == [[[records objectAtIndex: i]valueForKey:@"marblesneeded"] intValue]) {
marbelesreached = YES;
break;
}
}
What is the code to find out which index number is equal.
Thanks