C++ Language/Indirection/Arrays

From Wikibooks, open books for an open world
Jump to navigation Jump to search

The definition int piArray[3] = {0, 11, 22}; defines an "array" variable. In memory, space is reserved for three integers (contiguously). The array variable piArray is equivalent to a pointer which is pointing at the first of those three integers.

Additional information about arrays (includes interactive examples)