initialize 3d vector c++

C++
vector<vector<vector<double>>> f(3, vector<vector<double>>(4, vector<double>(5)));
Source

Also in C++: