On Mon, Apr 20, 2009 at 3:58 PM, Christopher Coale <[email protected]> wrote:
> Paul Herring wrote:
>>
>>
>> On Mon, Apr 20, 2009 at 4:22 PM, Tyler Littlefield
>> <[email protected] <mailto:tyler%40tysdomain.com>> wrote:
>> > I would use pointers, it's easier to pass in one function call
>> rather than passing an object of what ever size.
>>
>> This is C++, not C.
>
> It would be much quicker to push and pop a 4-byte pointer than to push
> and pop a 256-byte class for everything you do with it. Hence, C++ gives
> us the "->" operator for object pointers.
In C++, I would use references rather than pointers (which is what
Paul was hitning at). I believe the STL container classes (like
vector) are designed around the use of references.
-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
If I were to divulge it, it would overturn the world."
-- Jelaleddin Rumi