Chapter 10. Using Pointers and References

  • Declare, dereference, and assign pointers

  • Use pointers to structures

  • Use pointers as function parameters

  • Use pointer arithmetic

  • Declare and initialize a reference

  • Use references as function parameters and return values



Software is, at its heart, lots of binary code—a slew of 1s and 0s flipping about, turning on and off. As programming languages have progressed and evolved over the years, the abstraction separating the programmer from the binary fiddling going on in the underlying hardware has dramatically increased.

This abstraction is complete in the case of some modern programming languages. Many contemporary programmers don’t even understand the notion of memory addressing—it’s ...

Get Practical C++ now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.