piruk wrote:
I create two dimensional vector:
vector < vector< vector<int v(100);
Actually that's a three-dimensional one. Did you mean to have one
less 'vector' in there?
And next I create
vector <inttemp(2);
temp[0]=1;
temp[1]=2;
And how to add temp to v on specified index?
If your 'v' is actually two-dimensional, you just assign it
For example I wold like to have vector temp on index 0 in v.
It means I would like to have:
v[0][0][0]=1 and v[0][0][1]=2
You can't have a vector of 'int' "on index 0" in a vector of vectors
of vectors of int. You have to define 'v' as
vector<vector<int v(100);
then you can do
vector<inttemp(2);
temp[0] = 1;
temp[1] = 2;
v[0] = temp;
assert(v[0][0] == 1 && v[0][1] == 2);
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask