Reputation: 13
I have an Xcode project with two NSArrays of objects, one named completionArray
filled with @"yes"
and @"no"
and one named allRequirements
with objects that represent college classes such as @"ITCS 1215"
. My goal is to search completionArray
until I reach @"no"
, then copy the object at that index from allRequirements
in to suggestionArray
, a NSMutableArray.
Here is my code so far, which does not work because it is throwing the error "Expected Identifier" after the last closing bracket.
for (int i = 0; i < [self.allRequirements count]; i++)
{
if([self.completionArray[i] isEqual:@"no"])
[self.suggestionArray addObject:[self.allRequirements[i]];
}
Thanks all.
Upvotes: 0
Views: 89
Reputation: 41682
Change this line:
[self.suggestionArray addObject:[self.allRequirements[i]];
to:
[self.suggestionArray addObject:self.allRequirements[i]];
Upvotes: 2