Differences between C++ pointers and C++ references

I was curious about the difference between C++ pointers and C++ references, so I searched and found this which says that basically:

  1. It’s not necessary to initialise pointers at declaration time, but it is necessary to initialise references at declaration time.
  2. You can create an array of pointers, but you can’t create an array of references.
  3. You can assign null to pointers, but you can’t assign null to references.

Leave a Reply