I'm new to objective C (and C) and got baffled over this comparison tonight.
The code is located in a fast enumeration loop, the variables being n and w.
The broken code piece was
if (n == w)
And fixing it was
if ([n isEqualToString:w])
I completely understand why the second works, as I was in fact comparing two strings, and that would be the logical method to use (Just took me a while to find it!) However, I don't understand why the first '==' comparison doesn't work, can anyone explain this in a little detail for me as I can't find any good references exactly how it works.
Many Thanks,