--- mdhanakoti <[EMAIL PROTECTED]> wrote: > > Yes, push_back takes a reference so that the item > is > > not copied to get it to the function, but > push_back > > makes a copy to add to the list (or other > container). > > By push_back taking a reference only one copy is > made > > instead of two. > > How about creating a std::vector<Item*>. That gets > rid of the need to > make copies all together. > > Murali. > > You still make copies, only this would make copies of the pointer.
Ray ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
