I have a basic understanding of pointers from C.
One thing that confused me for a while in objc with pointers was the fact that there was no dereferencing character being used, but I wasn't aware that that was what was confusing me, if that makes sense!
I think I've got a grip on that now.
But I'm still having a lot of issues with pointers and variables.
For instance I have a class with a list of properties, such as:
To me, this is a list of variables of different types. But there's some massive difference between the way the different types are working. And let's say I throw in a primitive C long there as well.
So Latitude is a pointer to a variable of type NSNumber? But NSInteger isn't a pointer, and when I @property it, I can't retain it, I simply assign it.
I've had no issues whatsoever working with the strings, but I have had issues working with integers and other variables.
These are really confusing me, and to be honest I just don't know what questions to ask. I've looked around and found a lot of information on pointers but still can't get my head around them.
Any help would be greatly appreciated, thanks in advance.
One thing that confused me for a while in objc with pointers was the fact that there was no dereferencing character being used, but I wasn't aware that that was what was confusing me, if that makes sense!
I think I've got a grip on that now.
But I'm still having a lot of issues with pointers and variables.
For instance I have a class with a list of properties, such as:
Code:
NSInteger atmID;
NSNumber *Latitude;
NSNumber *Longitude;
NSString *Add1;
NSString *Add2;
NSString *Add3;
To me, this is a list of variables of different types. But there's some massive difference between the way the different types are working. And let's say I throw in a primitive C long there as well.
So Latitude is a pointer to a variable of type NSNumber? But NSInteger isn't a pointer, and when I @property it, I can't retain it, I simply assign it.
I've had no issues whatsoever working with the strings, but I have had issues working with integers and other variables.
These are really confusing me, and to be honest I just don't know what questions to ask. I've looked around and found a lot of information on pointers but still can't get my head around them.
Any help would be greatly appreciated, thanks in advance.