Storing content within a vector into another vector?

Is it possible to store individual members of a vector within another vector?

Allow me to elaborate:

Let's say I declare a vector of vector<string> myVector and I store x names within the vector. Thus, myVector[0] = name1, myVector[1] = name2, myVector[3] = name3 ... myVector[x] = namex.

Now, I have another vector in which the first index of said vector should be a concatenation of the names, ie: vector<string> myVectorCombo --> myVectorCombo[0] = "name1name2name3name4 ... namex".

Is this possible to accomplish?

Have a look at combining vector iterators with the string + operator.
Topic archived. No new replies allowed.