Possible Duplicate:
How to pass objects to functions in C++?
When should I be passing arguments by reference and when passed by address?
I mean Except the case of pass by const reference, is there any difference between the two.
Possible Duplicate:
How to pass objects to functions in C++?
When should I be passing arguments by reference and when passed by address?
I mean Except the case of pass by const reference, is there any difference between the two.
I personally pass by pointer (address) when the pointer may be null, and pass by reference when it can't be null.
There are plenty of other considerations (const/non-const, smart/weak pointers etc) but I think this is a good guideline and answers your question well.