Possible Duplicates:
What's your preferred pointer declaration style, and why?
Placement of the asterisk in Objective-C
Is there any difference between
NSString* foo = @"I'm a string";
and
NSString *foo = @"I'm a string";
I’ve always used the latter way, but wasn’t sure if there actually was a difference.
Thanks!
No. There is no difference at all. It’s the same as in C language. They are both pointers to
NSString.Some people prefer the later form because it makes clear what variable is the pointer. I.E.:
Check out a C-FAQ entry on the topic.