Boost logo

Boost :

From: Vincent Finn (vincent.finn_at_[hidden])
Date: 2003-04-23 12:12:25


Justin M. Lewis wrote:
> Not entirely, passing a pointer doesn't tell you that the parameter will
> change, it just tells you that it might, it still leaves you in the position
> of having to track down the function and check it. But outside of that, if
> you're like me, at this point you prefer references to pointers, whenever
> possible.

I did use references everywhere but changed to pointers for the reason
you are talking about

I only use pointers if the argument might be changed
that way the &varName means varName will be changed in the function
if the arg won't be changed I pass const&

The only reason for doing this is to make it obvious which are in
parameters and which are out\inout
using a class just seemed like over kill for something so small

Oh well, it is all a matter of taste I suppose

        Vin


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk