Pointer Principles

What is a Pointer?

A pointer is a vary which ships a memory address.  Hand are used to store the addresses of other variables or flash items.  Pointers are extremely beneficial required another type regarding parameter passing, common referred to as Pass By Address.  Pointers are essential for dynamic memory allocation.

Declaring pointers:


Notation: Pointer dereferencing

pdeclare.cpp -- with example portraying the declaration and dereferencing of pointers
 

Initializing Pointers

So, how do we initialize a pointer? i.e. what can we assign under it?
  im * ptr;  ptr = ______;		// with what can we fill save blank?
Three ways are demonstrated there. (There is a 4th way, which is the most important of. This will become saved for later).

The null pointer

Pointers of the same type

The "address of" operator