The Concept of a Reference
Get a brief introduction to pointers and the concept of a reference.
We'll cover the following
Pointers
Pointers are variables that provide access to other variables. The value of a pointer is the address of the variable that it provides access to.
Pointers can point at any type of variable, object, and even other pointers. In this chapter, we will refer to all of these simply as variables.
Pointers are low-level features of microprocessors. They are an important part of system programming.
The syntax and semantics of pointers in D are inherited directly from C. Although pointers are notoriously the most difficult feature of C to comprehend, they should not be as difficult in D. This is because other features of D that are semantically close to pointers are more useful in situations where pointers would have to be used in other languages. When the ideas behind pointers are already understood from other features of D, pointers should be easier to grasp.
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy