When should you NOT use the asterisk (*) when declaring a variable in Objective C

Posted by Jason on Stack Overflow See other posts from Stack Overflow or by Jason
Published on 2009-07-23T15:29:07Z Indexed on 2010/03/21 23:11 UTC
Read the original article Hit count: 483

Filed under:
|

I have just started learning objective c and the asterisk is giving me some trouble. As I look through sample code, sometime it is used when declaring a variable and sometimes it is not. What are the "rules" for when it should be used. I thought it had something to do with the data type of the variable. (asterisk needed for object data types, not needed for simple data types like int) However, I have seen object data types such as CGPoint declared without the asterisk as well? Is there a definitive answer or does it have to do with how and what you use the variable for?

© Stack Overflow or respective owner

Related posts about objective-c

Related posts about iphone-sdk