I have a vector which elements are of type vector<int>
, I want to quickly insert elements like this :
triangles.push_back(vector<int>(som1, som2, som3))
However it doesn't work, no constructor of vector<int>
matches the argument list.
Is there a quick way to do it, or do I have to create a temporary vector<int>
variable, push back som1 som 2 and som3, and finally push back the temporary variable in triangles ?