Your question is not very clear, and it's posted in the C zone, even though it seems you're talking about C++.
Are you asking when to use references versus pointers in C++ ?
If so, the answer is simple : whenever you can, use references, otherwise, use pointers.
References are in many respects safer than pointers, which is why they are preferred. In some cases, you will not be able to use references though (like in containers, or when NULL is a valid value, or ...), so then you'll have to revert to pointers.