Possible Duplicate:
C++: Appending a vector to a vector
I’m looking for unlimited container (one that I add elements at run time as much as I need as long as I have enough space),such as ‘vector’ or ‘linked list’ that has a methos that accepts another container and copies its elements.
Is there such a thing?
You can use
std::copyand aback_inserteriterator to insert a range of values into any variable-size standard container.std::vectoralso has an insert overload that accepts a range.See Appending a vector to a vector, the answers are actually usable for containers besides just vectors.