I would make a class. Whether you include the name in the class or not depends on whether the name is a logical part of whatever data you are trying to represent. If you include it in the class, then you can make a set of your class objects, and create an operator< for the class that compares only the name. Or if the name is not part of the class or if you might be changing names as you go, then use a map of string to class objects.

As you said, if the list is big, it might be better to use a smart pointer. You can encapsulate that in the class itself so that when the class is copied the list is not.

>> Why did my post go to the top?
They fixed the time on the forum which apparently through off some post times.

Is name unique?
Despite being unique, do you want the list to be keyed on it?

Edit:
On a side note, map <bool, vector <string> is a no-no, unless really that is what you want. To have a map that can only take 2 entries. One for false and one for true. The alternative here would be:
map <string, pair <bool, vector <string> > >, or a multimap.

Last edited by Mario F.; 11-04-2006 at 09:04 PM.

Originally Posted by brewbuck:Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.