krishna.kishore.0987@gmail.com wrote:
> Why are always object pointers used? (i.e., ObjectType *objPointer)
Always? I don't always use them. In fact, I seldom use them.
This is a very typical example of where I don't use them:
std::string s = "hello";
No pointer there.
> one advantage I see is passing them across methods, but is this purely
> presentation issue (use 'objPointer' rather than '&obj') or are there
> some performance affects?
If you pass an object by value then a copy will most probably be made,
which will often be less efficient than passing by reference or by
pointer. Also there's the slicing problem if inheritance is involved.