How do you declare a 2D vector of a given size in C++?
How do you declare a 2D vector of a given size in C++? To initialize a two-dimensional vector to be of a certain size, you can first initialize a one-dimensional vector and then use this to initialize the two-dimensional one: vector v(5); vector > v2(8,v); or you can do it in one line: vector > […]