Question : c++ initialize vector of vector with size
Answered by : worthy-warrior
vector<vector<int>> v(10, vector<int>(10));
Source : | Last Update : Mon, 31 May 21
Question : c++ initialize size of 3d vector
Answered by : light-lyrebird-5d4glxz8m5h2
vector<vector<vector<double>>> f(3, vector<vector<double>>(4, vector<double>(5)));
Source : https://stackoverflow.com/questions/19484103/how-to-initialize-3-dimension-vector-with-the-size-in-c/19484115 | Last Update : Thu, 22 Oct 20
Question : vector with initial size
Answered by : steezcram
std::vector<std::string> vec(20000);
Source : https://stackoverflow.com/questions/11457571/how-to-set-initial-size-of-stdvector/11457629 | Last Update : Sat, 21 Aug 21