>> Depending on your problem
I will describe excatly what I am doing to get a better picture, I am a little confused myself that I am thinking right.
For the moment I have a 2D vector that could look like this:
(I am doing an illustration, putting the string inside [] just to illustrate more easy, I know I can´t put a string like that)
Code:
abc[1]["1"] //abc[1].push_back("1");
abc[1]["1,2"] //abc[1].push_back("1,2");
abc[1]["1,2,3"] //abc[1].push_back("1,2,3");
So I have push_backed a string like this. Now I want to do something with this string. I want to put this to the 3:rd dimension like this:
Code:
abc[1][0]["1"]
abc[1][1]["1"]
["2"]
abc[1][2]["1"]
["2"]
["3"]
First I have my 2D vector that I push_back and from this one I can iterate its content and put it like this to a 3D vector.
This is why I want to be able to push_back both 2D and 3D. For with it´s contents in place, I will be able to ::iterate
from begin() to != end().
So I will iterate the 3:rd dimension and when that is finished it will continue to iterate next 3:rd dimension for the 2:nd dimension,
Until the 2:nd dimension also reached it´s end() since every second dimension also can be different sizes because it was push_back in the 2D vector from the beginning.
So if I can ::iterate my 2D vector and "copy" and put the contents like this to a new 3D vector, that would be great.
This is why I want to use push_back both for the 2D and the 3D in the New 3D vector.