Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix
In C++, a pointer is a variable that contains a memory address. For instance, if x contains the address of y, then x is said
to "point to" y. Pointers and arrays are strongly related, and they are interchangeable in many cases. For instance, a
pointer that points to the beginning of an array can access that array by using
either pointer arithmetic or array-style indexing. Note that the general form of a pointer variable
declaration is: There are two special operators that are used with pointers: i) * and ii) &. Note that DM does not support such pointer variables.
|