I\'m coming from an Objective-C background and am trying to expand my knowledge in C. One thing has me confused, however, and that\'s the difference between pointers in C and O
Your NSString *string
is itself a pointer. Therefore, in order to point to it, you need to declare stringPointer
as a pointer to a pointer. That is, declare stringPointer
like this:
NSString **stringPointer;
Then everything should work. Note that the same pointer semantics apply in C and Objective-C.