Re: appending/joining STL::deque/list containers in constant time
by Christopher <cpisz@[EMAIL PROTECTED]
>
May 13, 2008 at 11:11 AM
On May 13, 10:34 am, Carter <carterch...@[EMAIL PROTECTED]
> wrote:
> This is probably somewhat of a beginners question but I am unfamiliar
> with alot of aspects of C++. What is the correct way to append
> multiple STL containers together in constant time. Obviously you can
> do this with a linked list but is it possible to do the same thing
> with the standard containers?
>
> Thanks in advance,
>
> Carter.
If they both contain the same data type, then iterate through one
while pu****ng onto the other?
a linked list is a standard STL container btw. All STL containers
provide an iterator which allows access to the underlying data and all
STL container have some kind of insertion method. Depending on the
containers in question, some allow a range of iterators for insertion.