Having a vector of vector with a fixed size,
vector<vector<int> > v(10);
I would like to initialize it so that it has in all elements a one dimensional vector with initialized value (for example 1).
I have used Boost Assign as follows
v = repeat(10,list_of(list_of(1)));
and I've got a compilation error
error: no matching function for call to ‘repeat(boost::assign_detail::generic_list<int>)’
Could you please tell me how to do that.
Thanks in advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…