Initializing a two dimensional std::vector
Use the std::vector::vector(count, value) constructor that accepts an initial size and a default value: If a value other than zero, say 4 for example, was required to be the default then: I should also mention uniform initialization was introduced in C++11, which permits the initialization of vector, and other containers, using {}: