For example, if we initialize vector
, the dimension in each direction is not specified. So, I am wondering, what com
vector<vector<vector<double>>> f(3, vector<vector<double>>(4, vector<double>(5)));
std::vector<std::vector<std::vector<double>>> f(3, std::vector<std::vector<double>>(4, std::vector<double>(5,0.0)));
For anyone who wants it without namespace std. Also the values in this f[3][4][5] are initialised to 0.0 which might be useful.