If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

selecting from a group in c++

I want to select 1 element from each vector without duplication of any combinations.
Essentially only when all combinations are done with 1st element in first vector ,only then it should move to next element in first vector
say i have elements :[123] [456] [789]

Re: selecting from a group in c++

Also, i cant have any repetitions and only after all combinations of 1 are done only then the loop has to move to next combination ie 247 combination and so on.

So, how did you generate that list? Write down the exact steps you took that, if followed, would produce the entire list. Then you can translate that into C++ code, but you need to write the steps down on paper first.

Cheers, D Drmmr

Please put [code][/code] tags around your code to preserve indentation and make it more readable.

As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky