I would like to write a function that generate an array of tuples containing all possible permutations of N balls in M boxes in C++.
The order (Edit : in the resulti
Actually there is one. Take a look at: http://photon.poly.edu/~hbr/boost/combinations.html
It is not in boost but follows the same principles as is easily visible from the name.