I have 10 objects and I want to choose 5 from these objects and repetition is allowed. The permutation equation for that is 10!/(10-5)! which will give me all the possible permutations. I want to know if there is a C++ code that can do that. I give it an array of 10 objects and it prints out all the permutations of 5 selected objects at a time.
If repetition is allowed then that's not a permutation.
The problem you describe is equivalent to having an alphabet of 10 elements and generating all strings of size 5 in that alphabet, which in turn is equivalent to generating the decimal representations of all integers between 0 and 10^5 - 1, zero-padded to 5 digits.