A good reason why I use pointers and not references in my C++ applications, is readability. When using a pointer you see what is really happening, and when using pointers the syntax tells you what's really happening.
Same goes for "0" or "NULL". I prefer using "NULL", this way 3 months later when I see a code that looks like:
somevar_1 = 0;
somevar_2 = NULL;
I know that somevar_1
is an int
(or float
) and somevar_2
is some kind of pointer.