K
kathy
I try to use:
std::vector <std::vector <std::vector <int>>>;
But it seems not work.
how many layer the vector can be?
for example:
std::vector <std::vector <std::vector <int>>> v1;
std::vector <std::vector <int>> v2;
v1.resize(2);
v1[0].resize(2);
v1[0][0].resize(2);
v1[0][0][0] = 1;//wrong
v2.resize(2);
v2[0].resize(2);
v2[0][0] = 1;//OK
std::vector <std::vector <std::vector <int>>>;
But it seems not work.
how many layer the vector can be?
for example:
std::vector <std::vector <std::vector <int>>> v1;
std::vector <std::vector <int>> v2;
v1.resize(2);
v1[0].resize(2);
v1[0][0].resize(2);
v1[0][0][0] = 1;//wrong
v2.resize(2);
v2[0].resize(2);
v2[0][0] = 1;//OK