I have a class
class A
{
private:
std::vector< std::vector<int> > v;
//other statements
}
I would like to initialize both dimensions of this vector by passing them to the constructor of the class, possibly using initializer lists.
This question asks about the same question for a vector of integers, and this asks about initialization of a vector of vectors, but outside any class. I want to initialize the sizes of both dimensions, but the vector is a class member.
How can I do this?