In C++, a reference is an opaque pointer. References are somewhat safer than pointers because you must initialize a reference when it is declared. This means that it is impossible to have an unitialized reference. However, once the reference has been initialized, it is still possible to delete that which it refers to, breaking the reference.

References can be used as members of a class, but they must be initialized in every constructor for that class. Modern C++ programmers use references instead of pointers whenever possible, most often as a means of passing parameters to methods.