Hi,
just working on a word checker app, have the following code:
.
.
.
the problem i am having is whenever i insert the last element (i.e. "four"), it seems to be alright, HOWEVER, when i try the rest elements it is not working.... it returns no.
I am new to objective-c, this code would simply work on java, but i dont know why its not working
So i would appreciate it if someone there could give me help.
thanks!
just working on a word checker app, have the following code:
Code:
NSArray* myarray_;
NSString* return_=@"";
myarray_ = [[NSArray alloc] initWithObjects:@"one",@"two",@"three",@"four",nil];
.
.
.
for (int x=0;x<=sizeof myarray_;x++)
{
NSString* wordcheck_=[NSString stringWithFormat:@"%@",[myarray_ objectAtIndex:x]];
if ([inputWORD_ isEqualToString: wordcheck_])
return_=@"YES";
else
return_=@"No";
}
return return_;
.
.
.
the problem i am having is whenever i insert the last element (i.e. "four"), it seems to be alright, HOWEVER, when i try the rest elements it is not working.... it returns no.
I am new to objective-c, this code would simply work on java, but i dont know why its not working
So i would appreciate it if someone there could give me help.

thanks!