Z
zgfareed
The requirements for my program is to input a set of substrings and
the length of the resulting strings which must be a multiple of the
length of the substrings. I have written the following program which
only generates permutations of the inputted substrings which does not
allow for repititions which is required for the output. For eg. with
substrings ef gh jk generate efefef efghjk etc. I have included the
permutation part of my program.
<code/>
copy(subString.begin(),subString.end(),ostream_iterator<string>(cout,""));
cout << endl;
while (next_permutation(subString.begin(), subString.end()))
{
copy(subString.begin(),subString.end(),ostream_iterator<string>(cout,""));
cout << endl;
}
</code>
By the way I load my substrings into a vector which I have not shown
here. Any suggestions??
the length of the resulting strings which must be a multiple of the
length of the substrings. I have written the following program which
only generates permutations of the inputted substrings which does not
allow for repititions which is required for the output. For eg. with
substrings ef gh jk generate efefef efghjk etc. I have included the
permutation part of my program.
<code/>
copy(subString.begin(),subString.end(),ostream_iterator<string>(cout,""));
cout << endl;
while (next_permutation(subString.begin(), subString.end()))
{
copy(subString.begin(),subString.end(),ostream_iterator<string>(cout,""));
cout << endl;
}
</code>
By the way I load my substrings into a vector which I have not shown
here. Any suggestions??