How can I delat a <list> versus <vector> decision?
Posted on 2000-05-08
I want to put several items (which I will call contigs) into a container. I haven't decided yet whether to use <list> or <vector> or conceivably something else.
Now I have another structure that needs to point
to various contigs (elements in the above container).
If I use a<vector> to hold the contigs, I would
use an index into that vector. If I use a <list> to
hold the contigs, I would use a pointer or iterator.
At first I thought that an iterator was the common
denominator. But, iterators become invalid if the
vector is lengthened (I think).