Is there a shorter way to declare multidimensional vectors?

Viewed 57

The way that I declare multidimensional vectors in C++ of a given size is very verbose:

int a = 3, b = 4, c = 5;
std::vector<std::vector<std::vector<int>>> vec(a, std::vector<std::vector<int>>(b, std::vector<int>(c, 0)));

Is there any way to make this shorter?

0 Answers
Related