Chora Mora

1

votes
1

answer
86

views

How to push_back() number so they have a pair in a vector?

I am trying to make a grid/matrix which has even numbers of pairs (like in pairs for instance 1 would have another pair or 3 more 1's to make 2 pairs). Currently I have few with no pairs. How can I solve? Thanks. I have done the coding for pushing, but I haven't succeeded yet to generate equal quant...
Chora Mora
-2

votes
0

answer
19

views

How do I copy elements which are stored in a int list to a int vector? [on hold]

I have a task to copy a listx elements into vectory using STL algorithms. I have checked everywhere, seems there is no way. Does anyone know? Please help out. I have created another vector with capacity to copy up to 10 elements. But my copy() function is not working. /*Here is the chunk of a code...
Chora Mora