I am trying to make a 5-dimensional vector, and I cannot get it to work. I know if I need to write a three-dimensional vector, I could write it as follows:
vector< vector< vector<string> > > block(27, vector< vector<string> > (27, vector<string>(27)));
Then I call it: block[x][y][z] = "hello";
I wrote a 5-dimensional vector as follows, and this gives me an error.
vector< vector< vector< vector< vector<string> > > > > block(27, vector< vector< vector< vector<string> > > >(27, vector< vector< vector<string> > >(27, vector< vector<string> >(27, vector<string>(27)))));
Could you tell me how to write a 5-dimensional vector correctly? Many thanks.
source
share