generate all permutations

hi all.

I have n number of sets
Each set contains characters

like

set1 set2 set3
a s a
b d c
c


how can i get all the possible combinations so that
first letter from first set and second number from second set. like that.
there is a possibility of n number of sets and set are independent.

my required output in this case id

asa
bsa
csa
ada
bda
cda
asc
bsc
csc
adc
bdc
cdc


please provide me a solution
please provide me a solution
By saying that you shouldn't have any answer.
Anyway, here is a hint: http://www.cplusplus.com/reference/algorithm/next_permutation/
what you are trying to do here is not a permutation (at least after looking at your demanded output)

(maybe that's why you corrected yourself and post second topic)

Topic archived. No new replies allowed.