STL C++ list

Started by
1 comment, last by ianlo 19 years, 10 months ago
Hi, I was wondering which is a better data structure for a std::list. To have a list of pointers to objects or a list of objects themselves? Would love to hear any comments!
Advertisement
I''d go with a list of pointers. Surely if you''re going to use polymorphism. Otherwise, for simple things it doesn''t really matter.

SwSh website!
Closing because this is a double post. Respond to the other thread

----------------------------------------
"Before criticizing someone, walk a mile in their shoes.
Then, when you do criticize them, you will be a mile away and have their shoes." -- Deep Thoughts
"If you have any trouble sounding condescending, find a Unix user to show you how it''s done." - Scott Adams
FaceHat Software -- Wear the hat.

This topic is closed to new replies.

Advertisement