A three dimensional vector follows the same format that a 2 dimension vector has. If A, B, C … are defined as
std::vector<std::vector<double> > A (6,std::vector<double>(6));
Then their type is std::vector<std::vector<double> >
. To create a vector that will hold 8 of those then you need to use
std::vector<std::vector<std::vector<double>>> someName(8);
If you want to have the whole thing initialized at one time then the syntax becomes:
std::vector<std::vector<std::vector<double>>> someName(8, std::vector<std::vector<double>>(6,std::vector<double>(6)));
1
solved Std vector of std matrices (vector of vectors) in c++