Practical Electron Microscopy and Database

An Online Book, Second Edition by Dr. Yougui Liao (2006)

Practical Electron Microscopy and Database - An Online Book

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

pointer in C++

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:
         type *var-name;
where,
         type -- the pointer’s base type.
         var-name -- the name of the pointer variable.

There are two special operators that are used with pointers: i) * and ii) &.

Note that DM does not support such pointer variables.