In objective c, when creating objects, why do we need to use *? For example, we are creating
NSString *string =@"i ma string";
In the above code why do we need to use *string
Can anyone explain please?
Thanks in advance.
In objective c, when creating objects, why do we need to use *? For example, we are creating
NSString *string =@"i ma string";
In the above code why do we need to use *string
Can anyone explain please?
Thanks in advance.
Objective-C mandates that you access objects via pointers, such that they're created on the heap and never on the stack
*
means that it is pointer to object, not the actual object