Objective C pointer use -


possible duplicates:
what's preferred pointer declaration style, , why?
placement of asterisk in objective-c

is there difference between

nsstring* foo = @"i'm string"; 

and

nsstring *foo = @"i'm string"; 

i've used latter way, wasn't sure if there difference.

thanks!

no. there no difference @ all. it's same in c language. both pointers nsstring.

some people prefer later form because makes clear variable pointer. i.e.:

int* i, j; // pointer // j not pointer  int *i, j; // makes clearer pointer while j not  int *i, *j; // both pointers... 

check out c-faq entry on topic.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -