A reference is a kind of C++ voodoo doll. It is an alias for an object and is related to a pointer. References tend to be used to pass values to functions, and to avoid messy pointer notation. References must be associated with an already existing object, and once the reference is declared, you cannot change the object is is associated with. Once you've made a reference, anything you do to it is actually being done to the object it references.

To declare and init a reference, do this:

int i = 10;
int& ir = i; // ir is a reference to i
ir++; // i is now 11.

If you want to make a reference read-only, you can declare it as const.