Lesson 26. A few pointers
After reading lesson 26, you’ll be able to
- Declare and use pointers
- Understand the relationship between pointers and random access memory (RAM)
- Know when to use—and not use—pointers
Walk around any neighborhood and you’ll likely encounter homes with individual addresses and street signs to guide you on your way. You may happen upon a closed-down shop with an apologetic sign: “Sorry, we’ve moved!” Pointers are a bit like the sign in the store window that directs you to a different address.
A pointer is a variable that points to the address of another variable. In computer science, pointers are a form of indirection ...
Get Get Programming with Go now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.