array of vector<int>

vector<int> v(5) creates a vector<int> v of size 5

vector<int> v[5] creates an array v of 5 vector<int>'s

What if we want an array v of 5 vector<int>'s of size 5?
In general, it's not possible to pass parameters to constructors of objects in arrays. In this particular case, this may work (I wouldn't be surprised if it didn't):
std::vector<int> v[]={5,5,5,5,5};
Topic archived. No new replies allowed.