Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

xcodeNewbie

macrumors member
Original poster
Jul 1, 2011
65
0
When I start typing "nil" in Xcode the auto-completion comes up with two options, "nil" and "Nil". I am wondering what the difference is between these two are? Thanks in advance.
 
While they are the same, the generally accepted style is to use nil when dealing with any objective-c object types, and NULL if it's a (void *). In other words, nil is the correct Objective-C style, and NULL is the correct C style.
 
While they are the same, the generally accepted style is to use nil when dealing with any objective-c object types, and NULL if it's a (void *). In other words, nil is the correct Objective-C style, and NULL is the correct C style.

I second this.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.