Advertisement

Pointers

  • Joe Pitt-Francis
  • Jonathan Whiteley
Part of the Undergraduate Topics in Computer Science book series (UTICS)

Abstract

One of the key features of the C++ language is the concept of a pointer. As we demonstrate in this chapter, pointers are extremely useful for allocating memory for arrays whose sizes are not known when the code is compiled. We will see in the next chapter that they also have use when writing functions that allow us to repeat the same operation on different variables. Before we may use these features we first need to understand what a pointer is. This chapter therefore begins by introducing pointers through explaining how they relate to the storage of variables in the computer’s memory. Understanding this concept then makes utilising pointers for useful purposes a much simpler task.

Keywords

Pointer Variable Array Size Lower Triangular Matrix Physical Memory Dynamic Allocation 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Springer-Verlag London Limited 2012

Authors and Affiliations

  1. 1.Department of Computer ScienceUniversity of OxfordOxfordUK

Personalised recommendations