In This Chapter
Addressing variables in memory
Declaring and using pointer variables
Recognizing the inherent dangers of pointers
Passing pointers to functions
Allocating objects off the heap (whatever that is)
So far, the C++ language has been fairly conventional compared with other programming languages. Sure, some computer languages lack (il-)logical operators like those in Chapter 4, and C++ has its own unique symbols for things, but there’s been nothing new in the way of concepts. C++ really separates itself from the crowd in its use of pointer variables. A pointer is a variable that “points at” other variables. I realize that’s a circular argument, but suspend your disbelief at least until you can get into the chapter.
This chapter introduces the pointer variable type. It begins with some concept definitions, flows through pointer syntax, and then introduces some of the reasons for the pointer mania that grips the C++ programming ...