< Previous | Contents | Next >
A reference provides another name for a variable. Whatever you do to a reference is done to the variable to which it refers. You can think of a reference as a nickname for a variable—another name that the variable goes by. In the first program in this chapter, I’ll show you how to create references. Then, in the next few programs, I’ll show you why you’d want to use references and how they can improve your game programs.