I"m sure this is extremely basic, but maybe someone can give me the dummed down version.
I'm new to OOP, and Objective-C, so bare with me.
I understand that in
I'm telling the variable string to point to the NSString object. I understand that a memory location has been or will be allocated for the data of NSString, and that I just use string to point to that.
What I don't understand is sometimes i see the following things:
NSString * string;
or
NSString* string;
and (NSString *)string;
this is all quite confusing, and I can't really find any reference to the differences / meanings of these different ways of typing these things.
Any help / direction to links that give the basic rules of pointers and syntax are greatly appreciated.
I'm new to OOP, and Objective-C, so bare with me.
I understand that in
Code:
NSString *string;
I'm telling the variable string to point to the NSString object. I understand that a memory location has been or will be allocated for the data of NSString, and that I just use string to point to that.
What I don't understand is sometimes i see the following things:
NSString * string;
or
NSString* string;
and (NSString *)string;
this is all quite confusing, and I can't really find any reference to the differences / meanings of these different ways of typing these things.
Any help / direction to links that give the basic rules of pointers and syntax are greatly appreciated.