Pointers and references are just two different tools.
Pointers are useful for memory manipulations and references are useful with objects to be shared.
I can't find better words to describe the difference :-(
When you need to manipulate memory you are using pointers.
References can be refereed to as a special type of constant pointers. Once initialized, references keep the same address during lifespan. While pointers allow for any address to be stored.
May I ask, what optional output is?
Is it the situation, when a function could return correct value only under conditions?
Or might it be the case when a function is able to construct different objects?
And... Is it more logical to use status enumerations or throw an exception, when output is optional?