The Great Pointer Syntax Debate

Asterisk

In Objective-C and other C-based languages, pointers are declared using the asterisk character. So, to declare a pointer to a UIView object called foo, in most examples and documentation you will see:

Continue reading

Advertisements

Double Pointers in Objective-C

Pointers

Ah, pointers. Nothing strikes more fear into the heart of novice C programmers, or developers who aren’t used to them. Add to that the notion of double pointers (**) and address-of operators (&) and you are pretty much guaranteed to scare them away. But they are really not that hard, as long as you understand 3 things:

Continue reading