Pointers
Pointers enable you to effectively represent complex data structures, change values passed as arguments to functions and methods, and more concisely and efficiently deal with arrays. At the end of this chapter, we also clue you in about how important they are to the implementation of objects in the Objective-C language.
We introduced the concept of a pointer in Chapter 8, “Inheritance,” when we talked about the Point and Rectangle classes and stated that you can have multiple references to the same object.
To understand the way pointers operate, you first must understand the concept of indirection. We witness this concept in our everyday life. For example, suppose that I need to buy a new toner cartridge for my printer. In the company ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access