initialize vector with elements c++ code example
Example 1: initialize 3d vector c++
vector<vector<vector<double>>> f(3, vector<vector<double>>(4, vector<double>(5)));
Example 2: initialise 2d vector in c++
// Initializing 2D vector "vect" with
// values
vector<vector<int> > vect{ { 1, 2, 3 },
{ 4, 5, 6 },
{ 7, 8, 9 } };