C++ Pointers:

  1. Pointers store addresses.

  2. To find the address of a variable, use the ampersand (&) in front of a variable identifier.

  3. Pointers need to be declared and initialized.

  4. Pointers may be declared and initialized at the same time.
    i.e typename * pointer name; (double * pw = wages;)

  5. Pointers can point to any type of information.

  6. Pointers can point to a specific data type like an integer.

  7. When declaring an integer pointer, use int *name. So to declare a pointer, put an asterisk in front of the identifier.
    Example:
    	int *intPtr;		//intPtr is a type that points to a type int;
     				//intPtr contains the address of a type int
    
    	int* is a derived type name, a pointer to int
    
  8. When creating a pointer for a structure, you can use the "new" operator. This will create dynamic structures. A dynamic structure is a structure that allocates memory during run-time, not during compile time.
    Example:
    	int * ps = new int;	//allocates memory with new
    	delete ps;		//free memory with delete
    
    Notice that we used another operator. The "delete" operator is used to return memory to the memory pool when you are done with it. This is an important step in making memory efficient programs.